Skip to content

Enable CORS headers on the dotsies website #4

@anka-213

Description

@anka-213

The bookmarklet currently doesn't work on any other website than the dotsies website itself, because most modern browsers requires a CORS header to load a font from a remote host.

Some websites also have a Content-Security-Policy that disallows any cross-origin request outside their whitelist, so there it's probably impossible. But for all the others without a CSP, I get the following error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://dotsies.org/Dotsies.ttf. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200. [Learn More]


I believe adding the header

Access-Control-Allow-Origin: *

should be sufficient to fix the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions