![]() |
Debugbar CORS - Console error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Debugbar CORS - Console error (/showthread.php?tid=79619) |
Debugbar CORS - Console error - AndrewDawnbringer - 07-08-2021 Hy. I'm getting these console messages on my site, running CI4: Quote:Access to XMLHttpRequest at 'https://www.domain.com/index.php?debugbar_time=1625747857' from origin 'https://domain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Of course I googled it, made a filter for it, and I also put the 'Access-Control-Allow-Origin' header into the Controller, but I'm still getting this error. What am I doing wrong? RE: Debugbar CORS - Console error - paliz - 07-08-2021 Use sub domain Api.Exmple. Com Upload ci4 there And Exmple.com for anguar or react Yoi need cors filter too It has be global and init before other filters RE: Debugbar CORS - Console error - InsiteFX - 07-08-2021 Add to your .htaccess file along side where index.php is. Code: ## For CORS Configuration Try that, it's what I use. RE: Debugbar CORS - Console error - AndrewDawnbringer - 07-11-2021 (07-08-2021, 09:18 AM)paliz Wrote: Use sub domain Api.Exmple. Com Is it something for only Angular / React? Didn't planned to use those, so I'm a bit confused. Isn't it 'PHP debugbar' ? RE: Debugbar CORS - Console error - AndrewDawnbringer - 07-11-2021 Thanks, I solved the issue following this guide, using Nginx. |