title: How to set custom headers with Keycloak Gatekeeper?
body: <p>I have Keycloak and Keycloak-Gatekeeper set up in OpenShift and it's acting as a proxy for an application that is running.</p>
  
  <p>The application that Keycloak Gatekeeper is proxying requires a custom cookie to be set so I figured I could use the Gatekeeper's custom header configuration to set this however I'm running into issues.</p>
  
  <p>Configuration looks like:</p>
  
  <pre><code>discovery-url: https://keycloak-url.com/auth/realms/MyRealm 
  client-id: MyClient
  client-secret: MyClientSecret
  cookie-access-name: my.token
  encryption_key: MY_KEY
  listen: :3000
  redirection-url: https://gatekeeper-url.com 
  upstream-url: https://app-url.com 
  verbose: true
  resources:
  - uri: /home/*
    roles:
      - MyClient:general-access
  headers:
    Set-Cookie: isLoggedIn=true
  </code></pre>
  
  <p>After re-deploying and running through the auth flow, the upstream URL/application is not receiving the custom header.  I tried with multiple headers (key/value) but can't seem to get it working or find where that header is being injected in the flow.</p>
  
  <p>I've also checked logs and haven't been able to find anything super useful.</p>
  
  <p><a href="https://github.com/keycloak/keycloak-gatekeeper/blob/master/config_sample.yml" rel="nofollow noreferrer">Sample Gatekeeper Config</a></p>
  
  <p><a href="https://www.keycloak.org/docs/latest/securing_apps/index.html#custom-headers" rel="nofollow noreferrer">Gatekeeper Custom Headers Docs</a></p>
  
  <p>Any suggestions/ideas on how to get this working?</p>