<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2634489&amp;fmt=gif">

Infrastructure, Cloud Run

Cloud Run hosted app - redirection results in CORS error

By Srinivasan Vanamali | January 10, 2022


I am running a frontend app on cloud run. When the backend server creates a redirect request to process a callback on the frontend app, cloud run response includes "access-control-allow-origin: *" from "

server: Google Frontend"


Chrome network trace shows the result was "CORS error" wildcard origin not allowed. The request for redirect header " origin: null" was included by Chrome. 

How do we configure cloud run not to include access-contron-allpow-origin: * or send a custom origin matching the app custom domain hosted on cloud run?


Best answer by guillaume blaquiere

Hi Mali.

Cloud Run doesn’t include the allow origin header by itself. You app must do it. Review your code, your libraries, your configuration, you should have an existing layer that perform that operation.


Recent Articles

Google Cloud Strategy

AI Cheat Sheet

AI is no more and no less the drive to create robots with human minds so they can do everything we do and more. Use this cheat sheet to help decode the space.
By Leah Zitter
AI and Machine Learning

CarCast with Bruno Aziza: What Makes Us Better Than AI?!

Unlock the secrets of human cognitive superiority over AI in this compelling CarCast with Bruno Aziza and Kenneth Cukier.
By Bruno Aziza
AI and Machine Learning

CarCast with Bruno Aziza: The Metrics You CAN'T Afford To ...

Discover essential CEO metrics: Rule of 40, CAC Ratio, NRR/GRR, and more. Optimize your business for success now!
By Bruno Aziza