google.appengine.api.yaml_errors.EventError: Unexpected attribute "http_headers" for mapping type script.

2,241 views
Skip to first unread message

Tom Wu

unread,
Sep 2, 2014, 9:13:50 PM9/2/14
to google-ap...@googlegroups.com
Hi Pros,

Here is my demos/sample_app/module_A/app.yaml
....

handlers:
- url: .*
  script: _go_app
  http_headers:
    Access-Control-Allow-Origin: http://127.0.0.1:8080

goapp serve demos/sample_app/module_A/app.yaml

google.appengine.api.yaml_errors.EventError: Unexpected attribute "http_headers" for mapping type script.


Best Regards
Tom Wu





Tom Wu

unread,
Sep 2, 2014, 9:15:07 PM9/2/14
to google-ap...@googlegroups.com
SDK version 1.9.9

David Symonds

unread,
Sep 2, 2014, 9:15:09 PM9/2/14
to Tom Wu, google-appengine-go
I don't think you can use app.yaml to control HTTP headers for dynamic
handlers; that's only for static file handlers. Set the header within
your app code.

Tom Wu

unread,
Sep 2, 2014, 9:18:15 PM9/2/14
to google-ap...@googlegroups.com, servic...@gmail.com
Thanks David, I got it.

ray....@gmail.com

unread,
Sep 20, 2017, 10:13:22 PM9/20/17
to google-appengine-go
That's horrible. I wonder what the rationale is?

On Tuesday, September 2, 2014 at 6:18:15 PM UTC-7, Tom Wu wrote:
Thanks David, I got it.
Reply all
Reply to author
Forward
0 new messages