Wiki.js in subdirectory error Strict MIME checking is enabled

Hello, I am new to Traefik, and I am trying to use it as a reverse proxy for my podman containers.

My containers run on some port like 8001, 8002, 8003, etc, and I would like to expose them in paths like 10.0.0.1/path1, 10.0.0.1/path2, 10.0.0.1/path3.

My configuration right now is the following:

http:
  middlewares:
    root-stripprefix:
      stripPrefixRegex:
        regex:
          - "/[^/]+"

  routers:
    path1:
      rule: "Host(`10.0.0.1`) && PathPrefix(`/path1`)"
      service: path1
      middlewares: root-stripprefix
    path2:
      rule: "Host(`10.0.0.1`) && PathPrefix(`/path2`)"
      service: path2
      middlewares: root-stripprefix
    path3:
      rule: "Host(`10.0.0.1`) && PathPrefix(`/path3`)"
      service: path3
      middlewares: root-stripprefix
  
  services:
    path1:
      loadBalancer:
        servers:
          - url: http://localhost:8001
    path2:
      loadBalancer:
        servers:
          - url: http://localhost:8002
    path3:
      loadBalancer:
        servers:
          - url: http://localhost:8003

With the above configuration, some apps work without problems but wiki.js doesnt work when using /path and it gives the following errors on console:

Refused to apply style from 'http://10.0.0.1/_assets/css/app.b6f221fdcf920f30b05e.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Refused to execute script from 'http://10.0.0.1/_assets/js/runtime.js?1663707535' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Need a little help :slight_smile:

Did your setup run before using Traefik? I don't see anything related to MIME in your Traefik configuration, so it should all be set by your application, HTTP headers and your browser.

Have you validated your regex? Maybe it is messing up your URL and that's the reason your get a wrong response (error or wrong file with wrong mime type). Check your application logs what URL is received from them.

I'm sorry, it turns out that wikijs cannot run in a subdirecory. It is mentioned in their troubleshooting page.
Thank you for your time!