Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add CORS support for the portal watch handler.

  • Loading branch information...
commit 800a4a7e06927a360fcb3ab426af0a16f29250f9 1 parent f9f3fbe
@arantius arantius authored
Showing with 11 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +10 −0 server/main.py
View
1  .gitignore
@@ -0,0 +1 @@
+*.pyc
View
10 server/main.py
@@ -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):
Please sign in to comment.
Something went wrong with that request. Please try again.