mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-13 13:03:01 +00:00
make multiuser_notebook a package
This commit is contained in:
16
multiuser_notebook/headers.py
Normal file
16
multiuser_notebook/headers.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import json
|
||||
|
||||
from tornado import web
|
||||
from tornado.escape import xhtml_escape
|
||||
|
||||
class HeadersHandler(web.RequestHandler):
|
||||
def get(self):
|
||||
headers = {}
|
||||
for key, value in self.request.headers.items():
|
||||
if ';' in value:
|
||||
value = [ s.strip() for s in value.split(';') ]
|
||||
headers[key] = value
|
||||
self.write("<pre>%s</pre>" % (
|
||||
xhtml_escape(json.dumps(headers, indent=1))
|
||||
))
|
||||
|
Reference in New Issue
Block a user