mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 19:40:12 +00:00
Provide client hook to get session info
Web client may come in without knowing the session info. Provide it additional data to populate UI elements.
This commit is contained in:
parent
64751bccee
commit
5ab6a9e7b7
@ -468,6 +468,10 @@ def resourcehandler_backend(env, start_response):
|
||||
url = env['PATH_INFO']
|
||||
url = url.replace('.json', '')
|
||||
url = url.replace('.html', '')
|
||||
if url == '/sessions/current/info':
|
||||
start_response('200 OK', headers)
|
||||
yield json.dumps({'username': authorized['username']})
|
||||
return
|
||||
resource = '.' + url[url.rindex('/'):]
|
||||
lquerydict = copy.deepcopy(querydict)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user