Font files issue

Hello, I have a project that uses traefik as proxy for a wordpress site. In wordpress, I loaded a font file that I want to use and I see that in wordpress editor the preview renders the custom font just fine, but in the live page the font does not load.

I tried bypassing traefik and the font works perfect when accessing wordpress directly, so there is some issue with traefik handling the font, it is curious also that if I try to access directly to font file url from a browser, I can download it just fine, so the issue is only when it is imported from a live page, any ideas?

P.D: as part of previous troubleshooting I found that it could be a CORS issue, but I also do not have any warnings related to this in browser console.

cheers

Share your full Traefik static and dynamic config, and docker-compose.yml.

Enable and check Traefik debug log (doc) and access log (doc).

Here it goes, I already enabled debug mode and nothing showed up

docker-compose.yml

version: "3.5"

services:
  traefik:
    container_name: traefik01
    hostname: traefik01
    image: traefik
    restart: always
    networks:
      - traefik
    ports:
      - 80:80
      - 443:443
    volumes:
      - /root/docker/traefik/traefik-config/traefik.yml:/etc/traefik/traefik.yml
      - /root/docker/traefik/traefik-config/traefik_dynamic.yml:/etc/traefik/traefik_dynamic.yml
      - /root/docker/traefik/traefik-logs:/var/log/traefik
      - /root/docker/syncthing/certs/acme.json:/letsencrypt/acme.json
      - /var/run/docker.sock:/var/run/docker.sock

networks:
  traefik:
    external: false
    name: traefik

traefik.yml

api:
  dashboard: true
  debug: true

entryPoints:
  web:
    address: ':80'
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https
      middlewares:
        - crowdsec-bouncer@file
    forwardedHeaders:
      trustedIPs:
        - 127.0.0.1/32
       # a lot of IPs more here
  websecure:
    address: ':443'
    forwardedHeaders:
      trustedIPs:
        - 127.0.0.1/32
        # a lot of IPs more here
    proxyProtocol:
      trustedIPs:
        - 127.0.0.1/32
       # a lot of IPs more here
    http:
      middlewares:
        - crowdsec-bouncer@file

providers:
  docker:
    watch: true
    network: traefik
  file:
    filename: /etc/traefik/traefik_dynamic.yml

certificatesResolvers:
  lets-encrypt:
    acme:
      email: redacted@redacted.com
      storage: /letsencrypt/acme.json
      httpChallenge:
        entryPoint: web

log:
  level: "DEBUG"
  filePath: "/var/log/traefik/traefik.log"

accessLog:
  filePath: "/var/log/traefik/access.log"
  fields:
    names:
      StartUTC: drop

traefik_dynamic.yml

  middlewares:
    ip-whitelist-custom:
      ipWhiteList:
        sourceRange:
          - "192.168.1.0/24"
          # a lot of IPs more here
    crowdsec-bouncer:
      forwardauth:
        address: http://crowdsec-bouncer-traefik:8080/api/v1/forwardAuth
        trustForwardHeader: true

Traefik is very talkative in debug. Is the bind mount working?

What errors do you see in browser developer tools network tab?

PS: this looks interesting :smile:

Yes the bind is working since I can see other logs and debug logs when enabled, but nothing related to font loading issue (accesing font file in the backend)

In dev tools network tab there are no errors also

Nothing more that a proof of concept :stuck_out_tongue:

There should be an error in browser (not found, not allowed) and potentially in log (not found).

Check this :joy: