Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GAE(python): set Access-Control-Allow-Origin

I have a static page in google app engine(python), and I want to $.load() the content of this page from another page -> therefore I have a CORS problem. How can I set in GAE to allow all domains to load the content of the page?(Access-Control-Allow-Origin: *)

like image 634
Le_Coeur Avatar asked Jun 20 '11 11:06

Le_Coeur


People also ask

How do I enable CORS Python?

Allow CORS Therefore, if you want to enable CORS, you should specify allowed origins(origins that are permitted to make cross-origin requests), allowed methods(HTTP methods that are allowed for cross-origin requests), and allowed headers(HTTP request headers that should be supported for cross-origin requests) etc.

How do I allow Cors Access-Control-allow-origin?

Simply activate the add-on and perform the request. CORS or Cross-Origin Resource Sharing is blocked in modern browsers by default (in JavaScript APIs). Installing this add-on will allow you to unblock this feature.

What is allow access allow origin?

What is the Access-Control-Allow-Origin response header? The Access-Control-Allow-Origin header is included in the response from one website to a request originating from another website, and identifies the permitted origin of the request.


1 Answers

In app.yaml

http_headers:
  X-Foo-Header: foo
  X-Bar-Header: bar value

https://developers.google.com/appengine/docs/python/config/appconfig#Static_Directory_Handlers

like image 122
Boris Smus Avatar answered Sep 23 '22 00:09

Boris Smus