Ankit Tyagi
Ankit Tyagi

Reputation: 11

CORS policy issue with GKE ingress

We are facing an error related of CORS policy:

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there any way to allow it from gce-ingress annotations ?

Please help.

Upvotes: 1

Views: 2142

Answers (1)

Gari Singh
Gari Singh

Reputation: 12013

This cannot currently be done using annotations. The only option available is to modify the HTTP load balancer created by gce-ingress. You can set custom response headers on the actual LB. The variable origin_request_header can be used as the value of the 'Access-Control-Allow-Origin response header.

Upvotes: 1

Related Questions