[Node JS] Is it possible to enable CORS

1,048 views
Skip to first unread message

Terry Di Luzio

unread,
Sep 17, 2017, 4:17:17 PM9/17/17
to Google App Engine
Hi everyone,

Having CORS issues with my project I was wondering if anyone knows how to enable CORS in (Node JS) Google App Engine.

Thank you ;)

Kenworth (Google Cloud Platform)

unread,
Sep 17, 2017, 6:42:09 PM9/17/17
to Google App Engine
You do not need to add any new code to take advantage of CORS support on Google App Engine, it will simply work as expected for Cloud Storage buckets configured with CORS. This article discusses Cross-Origin Resource Sharing (CORS) in more detail.

Terry Di Luzio

unread,
Sep 18, 2017, 9:02:49 AM9/18/17
to Google App Engine
Hi Kenworth,

thank you for your answer. So if I have an error: "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource" my ExpressJS API CORS config is causing it ?
I've tried everything I could to reproduce it locally; it is as if my CORS config is omitted once deployed.

Kenworth (Google Cloud Platform)

unread,
Sep 18, 2017, 7:50:57 PM9/18/17
to google-a...@googlegroups.com
Make sure you have supplied the CORS configuration data with the request, which specifies all the origins and request methods that are allowed to access the buckets. Can you send privately the redacted CORS config and HAR file of the request? Are you using resumable upload protocol?
Reply all
Reply to author
Forward
0 new messages