I'm new to Traefik (coming from NPM) and I'm facing an issue that I can't find elsewhere on this forum or the internet. I'm able to access a few of my services using the wildcard certificate I set up, absolutely no issues. However, I recently set up a Radarr instance to be routed via Traefik and I get this logged to my browser console after login:
Refused to apply style from 'https://radarr.domain.com/Content/Fonts/fonts.css?h=ZYP7+3tB+/eme7MGOlDOLg' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
radarr.domain.com/:1 Refused to apply style from 'https://radarr.domain.com/Content/styles.css?h=VAwjWra8YBWH8JiyE7JFDA' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
radarr.domain.com/:15 Refused to apply style from 'https://radarr.domain.com/Content/styles.css?h=VAwjWra8YBWH8JiyE7JFDA' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
For some reason the MIME type is being changed from text/css
to text/plain
for these 3 files. When accessing it directly via http://ip:port, I do not see this issue at all. The reason this is a serious problem is because it is cutting off most of the application, see below:
This makes the application completely unusable and I don't understand why this would be happening. I'm not running any middlewares or plugins, this is a very simple configuration.
static config:
global:
sendAnonymousUsage: false
log:
level: DEBUG
api:
dashboard: true
insecure: true
entryPoints:
https:
address: :443
http:
tls:
certResolver: cloudflare
domains:
- main: "domain.com"
sans:
- "*.domain.com"
certificatesResolvers:
cloudflare:
acme:
email: "email@gmail.com"
storage: /var/traefik/certs/cloudflare-acme.json
caServer: "https://acme-v02.api.letsencrypt.org/directory"
keyType: EC384
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53"
providers:
docker:
exposedByDefault: false
Radarr compose:
services:
radarr:
image: linuxserver/radarr:latest
container_name: radarr
restart: unless-stopped
ports:
- 7878:7878
environment:
- PUID=1000
- PGID=1001
- UMASK=022
volumes:
- /mnt/appdata/radarr:/config
- /mnt/downloads:/downloads
- /mnt/media/movies:/movies
labels:
- traefik.enable=true
- traefik.http.routers.radarr.rule=Host(`radarr.domain.com`)
- traefik.http.services.radarr.loadbalancer.server.port=7878
Again, this works exactly as expected locally, so I'm pretty confident that Traefik is to blame, I just can't figure out how. I don't see anything in the Traefik debug logs that suggest any issues.
EDIT: I just tried this again with a completely fresh installation and still see the exact same problem.
EDIT2: I eventually see this error log, but it takes a long time to show up after I try loading the page so it's hard to tell if it's definitely related
DBG github.com/traefik/traefik/v3/pkg/middlewares/recovery/recovery.go:45 > Request has been aborted [172.70.115.216:44036 - /api/hosts/75f8bb84-9211-483a-a195-ec9603aa0d63/containers/e97a5229dfcb/logs/stream?stdout=1&stderr=1&filter=radarr&levels=info&levels=debug&levels=warn&levels=error&levels=fatal&levels=trace&levels=unknown]: net/http: abort Handler middlewareName=traefik-internal-recovery middlewareType=Recovery