mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 23:58:23 -05:00
20151029-osdc-freeipa-workshop: add app.py
This commit is contained in:
committed by
Alexander Bokovoy
parent
32b37185ba
commit
a209cb9d37
@@ -0,0 +1,15 @@
|
||||
def application(environ, start_response):
|
||||
start_response('200 OK', [('Content-Type', 'text/plain')])
|
||||
logged_in = 'REMOTE_USER' in environ
|
||||
|
||||
if logged_in:
|
||||
yield "LOGGED IN AS: {}\n".format(environ['REMOTE_USER']).encode('utf8')
|
||||
else:
|
||||
yield b"NOT LOGGED IN\n"
|
||||
|
||||
yield b"\nREMOTE_* REQUEST VARIABLES:\n\n"
|
||||
|
||||
for k, v in environ.items():
|
||||
if k.startswith('REMOTE_'):
|
||||
yield " {}: {}\n".format(k, v).encode('utf8')
|
||||
|
||||
Reference in New Issue
Block a user