I have fonts folder in "public" folder. I am using font paths in css file like:
https://example.com/fonts/icomoon.eot?2p5wfs
I am having this issue:
from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
It works if I turn on my chrome "CORS" extension. How can I load icons without using this chrome extension?
Try:
config.action_dispatch.default_headers = {
'Access-Control-Allow-Origin' => 'https://example.com',
'Access-Control-Request-Method' => %w{GET POST OPTIONS}.join(",")
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With