Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Wire up gaesessions

  • Loading branch information...
commit 5022b92d7b8cffe48e07f95209c0e8bb5e65389f 1 parent 1e2aeca
@georgevreilly authored
Showing with 13 additions and 0 deletions.
  1. +6 −0 appengine_config.py
  2. +7 −0 gae_flask_app/settings.py
View
6 appengine_config.py
@@ -0,0 +1,6 @@
+from gae_flask_app import settings
+from gaesessions import SessionMiddleware
+
+def webapp_add_wsgi_middleware(app):
+ app = SessionMiddleware(app, cookie_key=settings.COOKIE_KEY)
+ return app
View
7 gae_flask_app/settings.py
@@ -1,2 +1,9 @@
+import os, binascii
+
+def hex_random(num_bytes):
+ return binascii.b2a_hex(os.urandom(num_bytes))
+
DEBUG=True # True => Security Hole
VIDEO_JSON="test-videos.json"
+
+COOKIE_KEY='0753e9465b8e5d2a0391dc3ef3f2e9a6ca14fc1bed63eae2c2101af80412de19c82553d532839495cc2b9e5db512d543dfb12cdbf9530c68fe9c57ced074c97a'
Please sign in to comment.
Something went wrong with that request. Please try again.