mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 22:48:02 -03:30
Check for missing environ in request
This commit is contained in:
parent
174d0e610f
commit
0e32644a27
@ -178,7 +178,7 @@ class URLModificationMiddleware(object):
|
||||
return '/'.join(url_units)
|
||||
|
||||
def process_request(self, request):
|
||||
if 'REQUEST_URI' in request.environ:
|
||||
if hasattr(request, 'environ') and 'REQUEST_URI' in request.environ:
|
||||
old_path = six.moves.urllib.parse.urlsplit(request.environ['REQUEST_URI']).path
|
||||
old_path = old_path[request.path.find(request.path_info):]
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user