deshack / melany

Melany, a simple responsive WordPress theme focused on content, everywhere.
melany.deshack.net
GNU General Public License v3.0
17 stars 7 forks source link

Fonts CORS issue #235

Closed deshack closed 9 years ago

deshack commented 9 years ago

I'm using Polylang in my own blog, and handling multilingual through subdomains.

In this context (when you have your main language at http://example.com and other languages at http://lang.example.com) fonts, like other resources, are loaded from the main domain (http://example.com), through Cross-Origin Resource Sharing (CORS).

Unlike stylesheets or scripts, fonts are blocked because no Access-Control-Allow-Origin header is present on the requested resource, therefore the subdomain is not allowed to access the resource.

deshack commented 9 years ago

One solution is setting the Access-Control-Allow-Origin header for the required resources through Apache or nginx (see David Walsh), but we should find a solution for all our users.