I am trying to create a request by saving data in the server but i got this issue: Authorization is not allowed by Access Control I am working on Frontend side Angular 4 ,related to spring Boot Backend side.
Please any help ?
Console window:
Failed to load http://localhost:8081/api/users: Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response.
Network page:
Request URL: http://localhost:8081/api/users
Request Method: OPTIONS
Status Code: 200 OK
Remote Address: 127.0.0.1:8081
Referrer Policy: no-referrer-when-downgrade
Access-Control-Allow-Origin: *
connection: close
content-length: 0
date: Mon, 13 Aug 2018 13:18:33 GMT
X-Powered-By: Express
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: fr,en-US;q=0.9,en;q=0.8,fr-FR;q=0.7
Access-Control-Request-Headers: authorization,content-type
Access-Control-Request-Method: POST
Connection: keep-alive
Host: localhost:8081
Origin: http://127.0.0.1:8081
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36