I have made a codeigniter
application. I uploaded it to http://www.domain.com
.
But Chrome
continuously give the message...
Font from origin http://www.domain.com has been blocked from loading by Cross-Origin Resource Sharing policy. Origin 'http://domain.com' is therefore not allowed access
.
I set my base_url
in config.php
as http://www.domain.com
but the error still persists.
When I changed the base_url
as http://domain.com
, it gives error as...
Font from origin http://domain.com has been blocked from loading by Cross-Origin Resource Sharing policy. Origin 'http://www.domain.com' is therefore not allowed access
.
I've written the below code in my web.config
, but no result.
<staticContent>
<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 IST" cacheControlMode="UseExpires" />
<remove fileExtension=".woff" /> <!-- In case IIS already has this mime type -->
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<remove fileExtension=".eot" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
</staticContent>
I have seen a, b, c these links, but unable to resolve.
What should I do ?
UPDATE
Actually the error comes from the domain name. If I write www.domain.com
while my config.php
base_url()
is http://domain.com
, it gives the error. On the other hand, if my If I write domain.com
while my config.php
base_url()
is http://www.domain.com
, it also gives the error.