1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

Cope when SCRIPT_NAME is not defined (#701)

Making this one line consistent with the rest of the code.
This commit is contained in:
Andy Jackson 2022-04-05 00:59:51 +01:00 committed by GitHub
parent 42445562da
commit 0c3eb4ce94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -832,7 +832,7 @@ class RewriterApp(object):
def get_rel_prefix(self, environ):
# return request.script_name
return environ.get('SCRIPT_NAME') + '/'
return environ.get('SCRIPT_NAME', '') + '/'
def get_full_prefix(self, environ):
return self.get_host_prefix(environ) + self.get_rel_prefix(environ)