title: Spring Cloud Gateway - RewriteLocationResponseHeader
body: <p>I have the following route inside my Spring Cloud Gateway configuration:</p>
  <pre><code>- id: pgadmin
    uri: lb://pg-admin-service
    predicates:
    - Path=/pgadmin/**
    filters:
    - RewritePath=/pgadmin(?&lt;segment&gt;/?.*), $\{segment}
    - RewriteLocationResponseHeader=AS_IN_REQUEST, Location, ,    &lt;---- this line is incorrect
  </code></pre>
  <p>The request comes in on <code>http://10.0.0.100/pgadmin/</code> as an unauthenticated user. The application returns a response containing a location header with the value:</p>
  <p><code>http://10.0.0.100/login</code></p>
  <p>The browser tries to rediect to that URL. Instead, it should redirect to:</p>
  <p><code>http://10.0.0.100/pgadmin/login</code></p>
  <p>What is the correct value for the <code>RewriteLocationResponseHeader</code> in the route definition?</p>
  <p>Many thanks</p>
  <p>JT</p>