Application Gateway config issue with WAF_V2 " CORS header ‘Access-Control-Allow-Origin’ missing".

Copper Contributor

We have configured Application gateway with WAF_V2 Tier. We are getting CORS issue ‘Access-Control-Allow-Origin’ missing while accessing the Application. Also we have enabled CORS Rule in azure portal Web API, but that doesn’t help us.

Its taking more time to configure the rules and if we stop/start the application gateway its not getting start.
Due to this issue every time we are recreating the application gateway because of Health Probe status showing as unhealthy.

The above all issue after deployed new WAF_V2 tier.

Previously we have configured SKU WAF Tier everything its working properly.

Also please find the attached "CORS-Issue.png" for your review.

 

Error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.testdomain.com/api/v1/mobileplatforms. (Reason: CORS request did not succeed).[Learn More]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.testdomain.com/api/v1/mobileplatforms. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Possibly unhandled rejection: {"data":null,"status":-1,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","headers":{"Authorization":"545454CF-74C6-4273-8E05-DB8F53662070:FKmHuWeC4D3pRL/+M44TvkFTqsIKS0/uOX0IVtGlIpM=","nna-date":"Mon, 08 Oct 2018 09:38:29 GMT","Accept":"application/json, text/plain, */*"},"url":"https://api.testdomain.com/api/v1/mobileplatforms","cached":false},"statusText":"","xhrStatus":"erro..."}.

1 Reply