Commit 65e324bc by Tom Christie

Merge pull request #108 from mjumbewu/patch-1

Only set the script_prefix if the prefix isn't already a full URL.
parents ccbb5368 7b6c56a7
......@@ -115,6 +115,7 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
# Calls to 'reverse' will not be fully qualified unless we set the scheme/host/port here.
orig_prefix = get_script_prefix()
if not (orig_prefix.startswith('http:') or orig_prefix.startswith('https:')):
prefix = '%s://%s' % (request.is_secure() and 'https' or 'http', request.get_host())
set_script_prefix(prefix + orig_prefix)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment