S
S
Sergey Valitov2016-01-12 08:02:08
Apache HTTP Server
Sergey Valitov, 2016-01-12 08:02:08

How to specify Access-Control-Allow-Origin on a subdomain?

Hello! Guys, such a question - did anyone use their fonts on a subdomain? Otherwise it gives an error in the console:
Font from origin 'site.ru' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'sub.site.ru' is therefore not allowed access.
I wrote a rule in htaccess:

<FilesMatch "\.(ttf|ttc|otf|eot|woff)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>

Doesn't help.. the font on the subdomain still doesn't cling

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Donald, 2016-01-12
Duck @Don_Donald

I saw a similar question not too long ago, found the answer here
stackoverflow.com/questions/25577981/font-from-ori...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question