Skip to content

Commit

Permalink
Add CORS support for the portal watch handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
arantius committed Dec 6, 2012
1 parent f9f3fbe commit 800a4a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pyc
10 changes: 10 additions & 0 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ def put(self, lat, lng):
pass
portal.put()

def options(self, unused_lat, unused_lng):
self.response.headers.add(
'Access-Control-Allow-Credentials', 'true');
self.response.headers.add(
'Access-Control-Allow-Origin', 'http://www.ingress.com');
self.response.headers.add(
'Access-Control-Allow-Methods', 'PUT');
self.response.headers.add(
'Access-Control-Max-Age', '1728000');


class XMPPHandler(webapp2.RequestHandler):
def post(self):
Expand Down

0 comments on commit 800a4a7

Please sign in to comment.