title: Extracting params in traefik.frontend.auth.forward.address service
body: <h1>Summary</h1>
  
  <p>I'm trying to set up an authentication passthrough using Traefik's <code>traefik.frontend.auth.forward.address</code> setting. My main web service has the <code>traefik.frontend.auth.forward.address=login.mydomain.com</code> label on the container. Traefik seems to correctly forward incoming requests intended for <code>mydomain.com</code> to <code>login.mydomain.com</code>, but when the login form is submitted, the POST request gets turned into a GET request before it hits the login service, and the parameters of the original POST request seem to be missing. The user can never log in.</p>
  
  <h1>Containers</h1>
  
  <pre><code>docker run -d \
      -l "traefik.frontend.rule=Host:login.mydomain.com; Method:GET, POST" \
      -l "traefik.enable=true" \
      login-service
  
  docker run -d \
      -l "traefik.frontend.rule=Host:mydomain.com" \
      -l "traefik.frontend.auth.forward.address=https://login.mydomain.com" \
      -l "traefik.frontend.auth.forward.authResponseHeaders=cookie" \
      -l "traefik.enable=true" \
      web-service
  </code></pre>
  
  <h1>Question</h1>
  
  <p>Using <code>auth.forward.address</code>, should I see the parameters from the original POST request in my login service? Since Traefik turns it into a GET request, where in that request should I be looking for the parameters? Or, perhaps I have misconfigured something? Missing a <code>authResponseHeaders</code> flag maybe?</p>
  
  <h1>What Works</h1>
  
  <p>Requests to <code>mydomain.com</code> show the login form from <code>login-service</code>, with the URL continuing to show <code>mydomain.com</code>; the redirect to <code>login.mydomain.com</code> is happening behind the scenes, which is correct.</p>
  
  <p>I have also tested the login service by itself, and it seems to work. It hosts a form that submits a POST request to the service, before responding with 200 OK and a <code>Set-Cookie</code> header. In fact, when I go to <code>login.mydomain.com</code> directly, I can login, which sets my cookie, and I can go to <code>mydomain.com</code> and skip the login screen.</p>
  
  <h1>What Doesn't Work</h1>
  
  <p>When submitting the login form, the POST request hits the <code>login-service</code> (as evidenced by the logs in that service) as a GET request and the data in the POST request appears to be gone. Traefik adds an <code>x-forwarded-method</code> set to <code>POST</code>, but I can't find the data in the original POST request. I need the params from my login form to validate them, and they don't appear to be getting through to the login service.</p>
  
  <h1>Traefik Configuration</h1>
  
  <p>I don't think anything about my Traefik configuration is relevant here, but I'm including it for completeness.</p>
  
  <pre><code>checkNewVersion = true
  logLevel = "DEBUG"
  defaultEntryPoints = ["https","http"]
  sendAnonymousUsage = true
  
  [api]
  dashboard = true
  debug = true
  
  [entryPoints]
  [entryPoints.http]
  address = ":80"
      [entryPoints.http.redirect]
      entryPoint = "https"
  [entryPoints.https]
  address = ":443"
  [entryPoints.https.tls]
  
  [retry]
  
  [docker]
  endpoint = "unix:///var/run/docker.sock"
  watch = true
  exposedbydefault = false
  
  [acme]
  email = "admin@mydomain.com"
  storage = "acme.json"
  entryPoint = "https"
  OnHostRule = true
  
  [acme.httpChallenge]
  entryPoint = "http"
  </code></pre>