2
response.setHeader("Access-Control-Allow-Origin", "*");
In the Chrome works normally.
Even with the configuration Access-Control-Allow-Origin in CORS, Firefox gives error:
(translated) Blocked cross-origin request: The same origin policy (Same Origin Policy) prevents reading the remote resource at http://localhost:8080/... (Reason: 'access-control-allow-origin' symbol missing in CORS header 'Access-Control-Allow-Headers' during CORS pre-connection)
Cross-Origin Request Blocked: The Same Origin Policy disallows Reading the remote Resource at http://localhost:8080/... (Reason: CORS request Did not Succeed).
Speak up, beast! Only one thing missing: explain, in fact, how to solve the problem. If the intention is only to explain the cause of the error and link the documentation (without solving and/or exemplifying), it is best to comment on the question...
– LipESprY
I did not explicitly leave the resolution but it is quite simple, I already edited adding the problem resolution. As for answering what does not depend on information it was implicit to add the header, so I didn’t say I explained what was causing.
– ferfabricio
Thanks ferfabricio!! Your tip solved the problem: Response.setHeader("Access-Control-Allow-Headers", "Access-Control-Allow-Origin");
– Bacamarte Linux
@ferfabricio now yes! ;D
– LipESprY