textpattern / textpattern-com-website

Official website of the Textpattern project.
https://textpattern.com
GNU General Public License v2.0
24 stars 8 forks source link

CORS on WOFF files #143

Closed petecooper closed 6 years ago

petecooper commented 6 years ago

Current website is throwing an error on remote (textpattern.io) WOFFs:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://textpattern.io/assets/fonts/pt-serif-v9-latin-ext-700.woff2. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
downloadable font: download failed (font-family: "PT Serif" style:normal weight:bold stretch:normal src index:0): bad URI or cross-site access not allowed source: https://textpattern.io/assets/fonts/pt-serif-v9-latin-ext-700.woff2

This might be restricted to Tor browser as I use that a cache-busting tool. New site build-in-progress has allowances for remote fonts (see https://github.com/textpattern/server-config/blob/master/tractor.textpattern.com/etc/nginx/sites-available/www-dev.textpattern.com.conf#L179 for current incarnation), and yet it throws the same error.

screen shot 2018-08-29 at 19 54 05

Edit: most straightforward solution would be to live with this until www.textpattern.com testing on new server has concluded, and move the files into the www.textpattern.com directory tree rather than www.textpattern.io

philwareham commented 6 years ago

I think this is also related to the staging code looking for css/assets at the .com URL - should be ok when properly live.