-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgae.py
More file actions
24 lines (18 loc) · 673 Bytes
/
gae.py
File metadata and controls
24 lines (18 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
class IndexHandler(webapp.RequestHandler):
def get(self):
if self.request.url.endswith('/'):
path = '%sindex.html'%self.request.url
else:
path = '%s/index.html'%self.request.url
self.response.headers.add_header('X-UA-Compatible', 'IE=Edge,chrome=1')
self.redirect(path)
def post(self):
self.get()
def main():
application = webapp.WSGIApplication([('/.*', IndexHandler)],
debug=False)
util.run_wsgi_app(application)
if __name__ == '__main__':
main()