CodeIgniter Forums

Full Version: Access-Control-Allow-Origin [SOLVED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have create RESTfull server in codeigniter 4, my ci4 app It is performed on fake virtual host, example, 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

login:1 Access to XMLHttpRequest at '' 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


i'm using reverse proxy to solve this problem.
(09-19-2019, 04:02 AM)titounnes Wrote: [ -> ]i'm using reverse proxy to solve this problem.

You could describe your solution?