title: Netflix Zuul CORS
body: <p>Hello all spring boot / cloud / Netflix Zuul experts !</p>
  
  <p>I am running a microservice environment using the Netflix OSS components and Spring Boot using eureka and Zuul for service discovery and routing. Multiple micro services are deployed on multiple VPS via docker. I am running an Angular JS client which accesses these microservices via a single endpoint using Zuul routing. </p>
  
  <p>I am using yeoman hottowel for the angular scaffolding for the rapid development that this enables, however I am hitting a problem with CORS since the web server is running on localhost:3000 and trying to invoke a RESTful endpoint through the Zuul router running elsewhere. </p>
  
  <p>I have played around with the Zuul filters (pre,route and post) to try and add the appropriate access-control headers to the response, and I can see that this works when I submit a POST request from a Rest client (I am using Paws) but when the request is submitted via angular JavaScript running in a browser, the CORS preflight OPTIONS request is not being handled by the filter, in fact Zuul returns a 403 error and the browser of course reports a CORS error.</p>
  
  <p>Maybe in production I can serve the JavaScript from the Zuul endpoint and not face this problem, but I would like to know if there is a way of configuring all the CORS handling within Zuul?</p>