Skip to content

rublin/XMLHttpRequest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring boot unauthorized response with XMLHttpRequest

This is a simple demonstration of issue with XMLHttpRequest header. Details are here

Try to run this project and access to endpoint http://localhost:8090/currency?id=KRB with wrong password.

You will receive an error message:

{
    "timestamp": 1516089712057,
    "status": 401,
    "error": "Unauthorized",
    "message": "A granted authority textual representation is required",
    "path": "/currency"
}

without header

But if you add the header XMLHttpRequest to request, you will not receive any response body messages:

with header

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages