Skip to content

How to enable CORS with gae-boilerplate? #311

@yoderjen

Description

@yoderjen

I'm trying to use the boilerplate code to hook up a user authentication/login system for an already existing web app. Since they'll have different domains, I need to enable CORS in the appengine handlers.
According to http://enable-cors.org/server_appengine.html , I can do this with the line
self.response.headers.add_header("Access-Control-Allow-Origin", "*")
in the handlers. But I've tried adding it to the end of the base handler (bp_includes/lib/basehandler.py), which didn't work, and also in the handlers for user registration (bp_includes/handlers.py), which also didn't work.

Where should I add the CORS headers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions