Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable CORS on Google App Engine Python Server?

I am see the following error on Javascript console:

VM31:1 XMLHttpRequest cannot load '<some-url>'. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<my-url>' is therefore not allowed access.

How do I enable Cross-Origin Resource Sharing with Google App Engine (Python) to access ?

like image 538
ssk Avatar asked Jul 03 '15 19:07

ssk


1 Answers

You'll have to use the Access-Control-Allow-Origin http header in your yaml configuration

handlers:
- url: /
  ...
  http_headers:
    Access-Control-Allow-Origin: http://my-url

Find more under CORS Support in the docs

like image 122
Jeffrey Godwyll Avatar answered Oct 29 '22 19:10

Jeffrey Godwyll