<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

Hello-

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

Data Analytics

Generative AI: Are You Behind?!

Review the latest insights from the AI Readiness Report.
By Bruno Aziza
Industry Solutions

Make "Gen AI Work": Landscape, SLMs vs. LLMs, Cost & More...

Discover the 5 metrics you need to know in order to be an exceptional CEO and Operator.
By Bruno Aziza
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