Issue
I am currently building a Ionic Application, using laravel framework for the website. The problem is the following : I got
No 'Access-Control-Allow-Origin' header is present on the requested resource.
when I try to get json file from my API. I saw that it is an header problem and I need to authorize Access-Control-Allow-Origin. And I did it Access-Control-Allow-Origin: *
When i refresh my page, I see with F12 menu on Chrome :
Response headers
Access-Control-Allow-Origin: *
So, that means that the access is authorized. But when i try to access the link
mywebsite.com/api
from the application, I still have the error No 'Access-Control-Allow-Origin' header is present on the requested resource.
If some experts knows how to fix this issue.
Solution
I post my solution if someone is in the same case as me. The problem came from the .htaccess, I had login and password to access to the domain, and it blocked the ionic application, just desactivate them (No others solutions works).
Answered By - Sebastien Kerroue
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.