title: Spring gateway serving login page and authorizing through zuul to oauth2 authorization server
body: <p>I have what seems like a fairly simple requirement:</p>
  
  <ul>
  <li>Spring Gateway serving static pages (including login) - Gateway acts as a Zuul proxy</li>
  <li>Authorization server as separate service using authorization code flow</li>
  <li>Various other services that provide information to the gateway (such as configuration information for the login page)</li>
  </ul>
  
  <p>I have looked at many examples and they all seem to use the authorization server to serve the login pages rather than the gateway.
  The one example people typically mention is the <a href="https://github.com/kakawait/uaa-behind-zuul-sample/tree/master/api-gateway" rel="nofollow noreferrer">https://github.com/kakawait/uaa-behind-zuul-sample/tree/master/api-gateway</a>
  sample. However the auth service manages the login page process.
  In my setup if I want the auth service to serve the login page then the auth service would also need to know about zuul routes etc which I want to avoid.</p>
  
  <p>Is this something that's even possible? Zuul seems to totally ignore my requests to go to the auth service.</p>
  
  <pre><code>zuul:
     sensitiveHeaders: Cookie,Set-Cookie
     SendErrorFilter:
        error:
          disable: true
     prefix: /api
     routes:
        uaa:
    sensitiveHeaders: Authorization
        path: /uaa/**
        serviceId: secureService
        stripPrefix: false
  </code></pre>
  
  <p>Requests to /api/uaa/oauth/authorize never get routed.</p>
  
  <p>I'm using Spring boot 2 (most examples are also in v1)</p>
  
  <p>If someone has a working example out there that would be amazing..this has already taken up days of effort.</p>
  
  <p>Thanks!</p>
  
  <p>Lee</p>