CORS policy error when using a custom chat theme with a custom font

  1. Client (production/canary) and FXServer version
    Canary

  2. What you expected to happen
    Chat Theme should load and use custom font in chat

  3. What actually happens
    F8 console prints the below error, 6 times:

Access to font at 'nui://chat-theme-lxk3y/Roboto-Bold.ttf' from origin 'nui://chat' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. (@chat/dist/ui.html:0)

  1. Category of bug (eg. client, server, weapons, peds, native)
    NUI/Chat

  2. Reproducible steps, preferably with example script(s)
    Add the attached chat theme to an empty server, start it, and connect. I have tested this on both
    prod and canary, and on production it was fine, but on Canary, the above issue occurred. The
    server i tested it on, was an empty localhost server, with no additional resources, running on b2189,
    absolute latest artefact. On Canary, the chat seems to default back to using some basic looking font. Still functions fine, just without the custom font.

Here is the resource i used to test it: chat-theme-lxk3y.zip (72.3 KB)

Should be fixed now.

1 Like

Yep working fine. Thanks :smiley: