Layer7 API Management

Expand all | Collapse all

How to Enable CORS in CA API Gateway 9.0

Jump to Best Answer
  • 1.  How to Enable CORS in CA API Gateway 9.0

    Posted 11-12-2018 10:11 PM

    We want to enable CORS for all the APIs in Gateway. APIs should be able to handle the Preflight (OPTIONS) requests & also add the CORS Headers in the response. Is there any way to implement this using the Global Policy Fragments?



  • 2.  Re: How to Enable CORS in CA API Gateway 9.0
    Best Answer

    Posted 11-13-2018 09:11 AM

    Hi

    have you had a look at Handling CORS on the Gateway  for a sample policy ?



  • 3.  Re: How to Enable CORS in CA API Gateway 9.0

    Posted 01-08-2019 08:51 PM

    The above answer is the main one, but just in case you have the same use case as us (where we had some requests would come in with and some without a previous CORS request) - this was how we solved that : 

    TechTip : When you need API Gateway Service to respond to both CORS and not CORS requests