Error in loading a custom font from the Media Library

Lambert Chan asked on July 10, 2019 20:35

I'm trying to upload a custom font to the website (and if relevant I don't have access to the site manager/folders/app_themes)

I've added acceptance of otf and ttf files to media library, uploaded all the font files there and then tried to called with through the page css

@font-face{
    font-family:gotham-black;
    src:url("/getmedia/somehahfrommedialibrary/gotham-black.otf") }

But when I loaded the website I have this CORS policy error and I'm unsure of how to handle it.

Access to font at 'https://website.org/getmedia/969adfd9-4fd6-4387-bb1b-2a1d0dd82d1f/Gotham-Black' from origin 'https://www.website.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

How would I go about this?

Correct Answer

Lambert Chan answered on July 11, 2019 01:19

After some more testing the issue has solved itself and it may have just been an incorrect url

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.