Translating NGINX to Traefik Rules

Hey,

I’m trying to make some amends to my Traefik installation to cater for these NGINX changes. Obviously I don’t use NGINX here so I’m trying to come up with a solution and this is what I’ve got so far.


http:
  ## ROUTERS ##
  routers:
    forgot:
      entryPoints:
        - https
      rule: 'Host(`<redacted>`) && Path(`/Users/ForgotPassword`)'
      service: forgot
      middlewares:
      - passwordReset
    forgotPin:
      entryPoints:
        - https
      rule: 'Host(`<redacted>`) && Path(`/Users/ForgotPassword/Pin`)'
      service: forgotPin
      middlewares:
      - passwordReset

  ## SERVICES ##
  services:
    forgot:
      loadBalancer:
        servers:
          - url: http://jellyfin:8096/Users/ForgotPassword
    forgotPin:
      loadBalancer:
        servers:
          - url: http://jellyfin:8096/Users/ForgotPassword/Pin

  ## MIDDLEWARES ##
  middlewares:
    # Jellyfin Header
    passwordReset:
      headers:
        customRequestHeaders:
          X-Forwarded-For: 127.0.0.1

This however doesn’t work and I’m not too sure why it’s not working as it looks to be what the docs translate to. Here is a link of what I am trying to achieve for my Jellyfin installation.

Appreciate any help!

Hi @LubricantJam,

I do not see any obvious error in what you are trying to achieve.
Is the X-Forwarded-For header correctly added in the request?
You can check this by added a simple netcat or something similar instead of your jellyfin app.

Thanks,
Maxence

It seems like it's not adding the header. I'm not sure if this is to do with the rules or not, I even tried testing with other headers in-case I got that wrong but it still does not work.