Search code examples
gitlabnuxt.jsgitlab-pages

Nuxt site on GitLab Pages blocked due to MIME type


I've seen other similar issues here, but as I am using GitLab pages for the first time, I wasn't able to find any setting to make changes there.

The problem I am having is the errors on Firefox:

The resource from “https://MYNAME.gitlab.io/_nuxt/08d802b84f0f5505a72c.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

and on Chrome:

The resource from “https://MYNAME.gitlab.io/_nuxt/08d802b84f0f5505a72c.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

This is returning a blank page as the Nuxt app cannot run.

I read about Access-Control-Allow-Origin: * but no idea how to set this up on GitLab page.

Thanks for your help!


Solution

  • as an update, it looks like the page works without error when reached from a custom domain, while the error persists if accessed directly via MYNAME.gitlab.io