AnsweredAssumed Answered

How to handle CORS requests in Virtual Service

Question asked by selvakumar.murugesan on Mar 15, 2018
Latest reply on Mar 28, 2018 by Joel NeSmith

We have created Virtual Services(VS) for a REST services based application .Most of the calls use HTTP POST method The Real Service and Virtual Services are consumed by a Mobile application.

 

Recently the Mobile application enabled new Browser for their app which uses CORS (Cross Origin Resource Sharing) . This is causing a preflight transaction to be sent out first  to the Virtual Service with HTTP OPTIONS method .  This causes the Virtual services to fail as CORS is not enalbled on Devtest . Only if this handled , the application can send the POST call to the virtual Service . I raised a ticket with CA support and got to know that Devtest does not support CORS functionality at the moment .As a workaround , please let me know if there is a way to handle incoming requests with OPTIONS as well as POST verbs for the same virtual Service . Any other suggestions are welcome.

Outcomes