Skip to content

Commit

Permalink
More general solution
Browse files Browse the repository at this point in the history
  • Loading branch information
stsewd committed May 1, 2018
1 parent 31bdebf commit 00391b8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions readthedocs/core/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ def process_request(self, request):
'PRODUCTION_DOMAIN',
'readthedocs.org'
)
# Django sets the urlconf for the current thread
# so we need to set this again later.
self.current_urlconf = get_urlconf()

if public_domain is None:
public_domain = production_domain
Expand Down Expand Up @@ -137,7 +134,7 @@ def process_request(self, request):
def process_response(self, request, response):
# Reset URLconf for this thread
# to the original one.
set_urlconf(self.current_urlconf)
set_urlconf(None)
return response


Expand Down

0 comments on commit 00391b8

Please sign in to comment.