Access-Control-Allow-Origin [SOLVED] |
I have create RESTfull server in codeigniter 4, my ci4 app It is performed on fake virtual host, example api.fakedomain.it, if i execute request from my REST client don't have problem, but if execute request call from my angular app to http://localhost:4200/ , i receive on browser debug console this error
Code: login:1 Access to XMLHttpRequest at 'http://api.fakedomain.it/api/v1/authentication' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. How can i configure CI4 ? thanks
I Ask and I resolve!
I have written solution in short article on my blog for this problem See https://carminemilieni.it/2019/09/19/res...igniter-4/ Thanks.
(09-19-2019, 04:02 AM)titounnes Wrote: i'm using reverse proxy to solve this problem. You could describe your solution?
I am a full-stack developer in Italy.
[[url=https://carminemilieni.it]carminemilieni.it [Image: https://carminemilieni.it/wp-content/upl...ieni-1.png] |
Welcome Guest, Not a member yet? Register Sign In |