Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How can conditionally add CORS header depending on request access origin?

Example:

If request.header.origin equals example.com then add cors for example.com

but if request.header.origin equals apigee.com then ad cors for apigee.com

how can I add the condition checking?

The goal is limiting CORS to a list of allowed origins.

0 2 812
2 REPLIES 2