Express server on App Engine - CORS problems when doing AJAX requests

350 views
Skip to first unread message

Boris Grubesic

unread,
May 3, 2019, 9:47:11 AM5/3/19
to Google App Engine
I get the "No 'Access-Control-Allow-Origin' header is present on the requested resource" when doing AJAX request to my Express API running on App Engine. The SPA application doing the requests is also running on Google Cloud. I have tried the cors module (https://www.npmjs.com/package/cors) with no luck.

Any ideas? 

George (Cloud Platform Support)

unread,
May 5, 2019, 12:31:24 PM5/5/19
to Google App Engine
Hello Boris, 

You may have to set CORS support in app.yaml, if you haven't already done so. Settings should match planned usage and your app's code. you may refer to the "CORS Support" sub-chapter of the "app.yaml Configuration File" page. 

This discussion group is oriented more towards general opinions, trends, and issues of general nature touching the app engine. For coding and program architecture, as well as setting up CORS support, you may be better served in dedicated forums such as stackoverflow, where experienced programmers are within reach and ready to help. 
Reply all
Reply to author
Forward
0 new messages