Access-Control-Allow-Origin / css font loading - 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: Access-Control-Allow-Origin / css font loading (/showthread.php?tid=76634) |
Access-Control-Allow-Origin / css font loading - the_steff - 06-04-2020 Hi ! I've got a problem with a font loading raisong Access-Control-Allow-Origin error. The url of this font is specified in my css which is loaded correctly (except for the font). Structure of my server : Code: /www In App.php, my $baseURL = "https://www.my_domain.com" I've set up my mutu server in order to point to "./www/public" so that CI4 is working pretty fine. But, I've got this "Access-Control-Allow-Origin" error disabling my css font loading when I try to access with "www.my_domain.com" It's working fine with "www.my_domain.com/index.php" or with "https://www.my_domain.com" All these auto/magic routes drives me crazy !! RE: Access-Control-Allow-Origin / css font loading - meta - 06-04-2020 Is your font being loaded from another domain? Maybe the URL of your font has a different protocol and that is misleading the headers and causing the browser's error. RE: Access-Control-Allow-Origin / css font loading - InsiteFX - 06-05-2020 You can add this to your .htaccess file for fonts. Code: # Add Font Types RE: Access-Control-Allow-Origin / css font loading - the_steff - 06-05-2020 It's working like a charm ! Thanks a lot ! |