mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Template updates, now includes middleware to detect the IGB
This commit is contained in:
19
sso/middleware.py
Normal file
19
sso/middleware.py
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
class IGBMiddleware(object):
|
||||
"""
|
||||
Middleware to detect the EVE IGB
|
||||
"""
|
||||
|
||||
def process_request(self, request):
|
||||
|
||||
request.is_igb = False
|
||||
request.is_igb_trusted = False
|
||||
|
||||
if request.META.has_key('HTTP_EVE_TRUSTED'):
|
||||
request.is_igb = True
|
||||
if request.META.get('HTTP_EVE_TRUSTED') == 'Yes':
|
||||
request.is_igb_trusted = True
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user