Page 1 of 1

Traefik reverse proxy and redirects

Posted: Fri Jul 05, 2019 7:58 pm
by benfayers
I have "Reverse" proxy mode set in the VRS Web Admin settings.

If I go to vrs.[mydomain]/VirtualRadar/desktop.html it works perfectly fine, however If i go to vrs.[mydomain]/VirtualRadar I am redirected to 192.168.0.213:8080/VirtualRadar/desktop.html

What can I do to stop this and make it redirect to the domain properly?

Here is my Traefik config for this subdomain:

Code: Select all

[http.middlewares]
    [http.middlewares.vrsPrefix.AddPrefix]
      prefix = "/VirtualRadar/"
    [http.middlewares.gotohttps.redirectscheme]
      scheme = "https"
    [http.middlewares.vrsHeaders.headers]
      Host = "vrs.[mydomain]"
      
 [http.routers.vrsRouter]
      rule = "Host(`vrs.[mydomain]`)"
      service = "vrs"
      middleswares = ["vrsHeaders", "gotohttps"]
      [http.routers.vrsRouter.tls]
Thanks,
Ben

Re: Traefik reverse proxy and redirects

Posted: Mon Jul 22, 2019 9:28 pm
by agw
Sorry for the late reply.

I think the proxy setting in VRS modifies how it builds the redirection URL when a request comes in for a partial address. Looking at the code I think when it's set to reverse proxy it uses the endpoint address off the request, if it's a forward proxy it uses the domain specified in the request.

I think you might just need to flip the VRS proxy type from reverse proxy to forward proxy?