Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard JS blocked because of a disallowed MIME type (“text/plain”) #10826

Closed
2 tasks done
ziqbal opened this issue Jun 19, 2024 · 4 comments
Closed
2 tasks done
Labels
area/webui contributor/wanted Participation from an external contributor is highly requested kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed.
Milestone

Comments

@ziqbal
Copy link

ziqbal commented Jun 19, 2024

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?

Loaded dashboard, viewed developer panel and see console and network requests

What did you see instead?

Noticed blocked content in console and network traffic:

Loading module from “http://127.0.0.1:8080/dashboard/assets/_hacks.de068122.js” was blocked because of a disallowed MIME type (“text/plain”). [dashboard](http://127.0.0.1:8080/dashboard/#/) Loading module from “http://127.0.0.1:8080/dashboard/assets/_init.a396cff6.js” was blocked because of a disallowed MIME type (“text/plain”). [dashboard](http://127.0.0.1:8080/dashboard/#/) Loading failed for the module with source “http://127.0.0.1:8080/dashboard/assets/_hacks.de068122.js”. [dashboard:1:1022](http://127.0.0.1:8080/dashboard/#/) Loading failed for the module with source “http://127.0.0.1:8080/dashboard/assets/_init.a396cff6.js”.

What version of Traefik are you using?

3.0.3

What is your environment & configuration?

Ubuntu 24.04 / Firefox 127.0

If applicable, please paste the log output in DEBUG level

No response

@rtribotte
Copy link
Member

Hello @ziqbal,

Thanks for your interest in Traefik!

As mentioned in the migration guide:

In v3, the Content-Type header is not auto-detected anymore when it is not set by the backend. One should use the ContentType middleware to enable the Content-Type header value auto-detection.

Did you try to use the content-type middleware?

@ziqbal
Copy link
Author

ziqbal commented Jun 20, 2024

@rtribotte Maybe I was not clear - the console logs are for the builtin traefik dashboard.
Other internal js files are loaded fine without errors.

@youkoulayley youkoulayley added kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. contributor/wanted Participation from an external contributor is highly requested and removed contributor/waiting-for-feedback status/0-needs-triage labels Jun 20, 2024
@nuxwin
Copy link

nuxwin commented Aug 3, 2024

Any new regarding this issue ? I'm encountering the same issue, even through, there is not problem navigating in the Dashboard.

My setup for the dashboard is as follows (dynamic traefik.yml conffile):

http:
  middlewares:
    authentication:
      basicAuth:
        users:
          - '[email protected]:$apr1$<passwordhash>'
    gzip:
      compress: true
    redirect-to-https:
      redirectScheme:
        scheme: https
    traefik-dashboard-https:
      chain:
        middlewares:
          - authentication
          - gzip
  routers:
    traefik-dashboard-http:
      entryPoints:
        - http
      middlewares:
        - redirect-to-https
      rule: Host(`traefik.srv01.konzeptplus-preview.ch`)
      service: api@internal
    traefik-dashboard-https:
      entryPoints:
        - https
      middlewares:
        - traefik-dashboard-https
      rule: Host(`traefik.srv01.konzeptplus-preview.ch`)
      service: api@internal
      tls:
        certResolver: letsencrypt

The errors in my FF console :
Capture d’écran 2024-08-03 à 18 38 48

@traefiker
Copy link
Contributor

Closed by #11109.

@traefiker traefiker added this to the 2.11 milestone Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/webui contributor/wanted Participation from an external contributor is highly requested kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed.
Projects
None yet
Development

No branches or pull requests

5 participants