I'm trying to use Traefik as a proxy to send traffic to gitlab review environments. Gitlab CI can start Docker containers to run a revision version of a project. I can have Traefik detect these containers and route traffic to them with this type of configuration in my docker-compose file:
- traefik.gitlab.frontend.rule = Host: gitlab.example.local; PathPrefixStrip: /review/$CI_BUILD_REF_NAME.$CI_PROJECT_NAME.$CI_PROJECT_NAMESPACE - traefik.gitlab.port = 80
With that, I can open "https: //gitlab.example.local/review/master.project.user/ping" and get my PONG page. But if I go to "https: //gitlab.example.local/review/master.project.user/", the simple test application I'm using will return a 303 redirection to / ping that will result in the state "https: // gitlab.example.local / ping" and is not mandated to the revision application.
> GET /review/master.10112.root HTTP / 2 > Host: gitlab.example.local > User Agent: curl / 7.54.0 > Accept: * / * > * The state of the connection has changed (MAX_CONCURRENT_STREAMS updated)! <HTTP / 2 303 <content-type: text / html; character set = utf-8 <date: Monday, 25 February 2019 08:25:44 GMT <location: / ping <content length: 32 < See other.
The documentation mentions an "X-Forwarded-Prefix" header being defined. I do not know if it is settled. I can not see this in a curl -V. Do I have to have an application that detects this header and prefix as a "basic path" for its answers? Is there a way to configure Traefik to add it to the return path?
Are there any other Docker-enabled proxy servers that I could use to route traffic to dynamic address gitlab revision environments?