agungsugiarto/codeigniter4-cors

Codeigniter 4.4.4 CORS not work

abmcr opened this issue · 2 comments

abmcr commented

With the last CI i get always this error

Access to XMLHttpRequest at 'https://ci4api.test/API/v1/locations' from origin 'http://localhost:9001' 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.

Same problem here, i seems that CI is not loaded and can't handle the cors, it must be set as a server rule.