Skip to content

Unauthorized response with XMLHttpRequest header #4968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rublin opened this issue Jan 17, 2018 · 0 comments
Open

Unauthorized response with XMLHttpRequest header #4968

rublin opened this issue Jan 17, 2018 · 0 comments
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@rublin
Copy link

rublin commented Jan 17, 2018

I use Spring Boot with Spring Security basic authentication. When i send request with wrong password, i'll receive normal error message in body:

{
    "timestamp": "2018-01-15T11:59:31.837+0000",
    "status": 401,
    "error": "Unauthorized",
    "message": "Bad credentials",
    "path": "/karbonator/api/v1/wallet"
}

without_header

But when i add additional header X-Requested-With: XMLHttpRequest to the request, i'll receive only status 401 and no body.

with_header

Code sample is here: https://github.com/rublin/XMLHttpRequest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

2 participants