Adding Acces-Control-Allow-Origin to app.yml
<p>I'm following these instructions from Google App Engine docs :</p>

<p><a href="https://cloud.google.com/appengine/docs/python/config/appref" rel="nofollow">https://cloud.google.com/appengine/docs/python/config/appref</a></p>

<p>If you search for CORS, you'll see the example I am trying to copy. </p>

<p>My app.yaml file looks like:</p>

<pre><code>runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
  script: main.app
  http_headers: Access-Control-Allow-Origin: *

libraries:
- name: ssl
  version: latest
</code></pre>

<p>However when I go to update it I get this error:</p>

<pre><code>appcfg.py: error: Error parsing ./app.yaml: Unable to assign value 'Access-Control-Allow-Origin' to attribute 'http_headers':
Value 'Access-Control-Allow-Origin' for http_headers is not of the expected type HttpHeadersDict
</code></pre>

<p>Why am I getting this error? What am I doing differently than the docs?</p>

<p>Unfortunately that's not valid <a href="http://yaml.org/" rel="nofollow">yaml</a>.</p>

<p>You have an indentation problem. Also you have to quote the <code>*</code>. Should be:</p>

<pre><code>handlers:
- url: /.*
  script: main.app
  http_headers: 
    Access-Control-Allow-Origin: "*"
</code></pre>

python google-app-engine cors