1

I am working on a Laravel API, and a angularJS front end application. I am trying to make request against my API but I keep having problems with this message in my Google Chrome Console:

XMLHttpRequest cannot load http://larashop.dev/api/authenticate. Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response.

Here is a screenshot from my network tab with the response header: enter image description here

So, I don't understand because I can see the "Access-Control-Allow-Origin:*". Here is my .htaccess file on my server:

<IfModule mod_headers.c>
    Header add Access-Control-Allow-Origin "*"
    Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
</IfModule>

I really don't know where to look at to solve the problem. What do I miss?

I also use satellizer with Angular in order to handle authentication

Thanks for the help :)

Hammerbot
  • 15,696
  • 9
  • 61
  • 103

0 Answers0