I am using CodeIgniter 3 as a web platform and am trying to import CSS semantic UI into my page. I do this using the CodeIgniter base_url() method in the href property to import CSS.
However, semantic.css itself imports some other fonts that are present on my server, which then cannot be downloaded due to Cross-Origin's resource sharing policy. This chrome error message gives me:
The font from the source ' http://[::1] ' was blocked when loading the Cross-Origin resource sharing policy: the header "Access-Control-Allow-Origin" is present on the requested resource. The origin of http: // localhost 'is therefore not allowed.
This is due to the fact that base_url () has something in common with the domain [::1] , and not with localhost, as I typed in the browser.
For some reason, it seems to me that chrome (as well as Edge) does not consider [::1] and localhost as the same host, or maybe I'm just dumb. However, I know that if I change the path to the main semantic.css file and the local host of the hard code, it works, and it also works if, instead of requesting my page using localhost, I use [::1]
I made other projects very similar to this, and this "[::1]" never appeared. What exactly causes php to echo this way?
php codeigniter codeigniter-2 codeigniter-3
Dalannar
source share