ocean O
asked on
Cross-origin resource sharing
HI, I am new to CORS. I have a question about it.
I have a js post call to web service API , but got an error in my local:
"Access to XMLHttpRequest at 'https://xyz.com/X/gettoken' from origin 'http://localhost:8080' has been blocked by CORS policy: The 'Access-Control-Allow-Orig in' header contains multiple values 'http://localhost:8080, *', but only one is allowed. "
I see in my java code, there are some code which add "resp.header("Access-Contr ol-Allow-O rigin", "*")". I removed it, and compiled and run, still get the same result.
Any inputs will be appreciated!
I have a js post call to web service API , but got an error in my local:
"Access to XMLHttpRequest at 'https://xyz.com/X/gettoken' from origin 'http://localhost:8080' has been blocked by CORS policy: The 'Access-Control-Allow-Orig
I see in my java code, there are some code which add "resp.header("Access-Contr
Any inputs will be appreciated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Javascript or Java ? this is two different language...