Keycloak JS adapter: Blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff)

Hello all,

I’ve built a project that uses react (front end), keycloak, and wagtail (backend) and receive an error any time I am running the project regardless of it where it is ran (locally or on a server in a container). Additionally I am using “import Keycloak from “keycloak-js”; // Import Keycloak from keycloak-js” to import the keycloak-js adapter.

The error is : The resource from “https://unpkg.com/keycloak-js@26.0.6/index.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).

I’ve tried searching if anyone else has experienced this error but I have not found any search result. From what I gather I should contact the administrator of unpkg.org to fix this header being return as “text/plan” ? Is there any reason I can fix the issue on my end. My server is running nginx and serving the front end to the clients (not sure if that matters) since the issue appears where the server is ran in HTTP or HTTPS.