From d97fefc3cb7594cbecf752e98a3be071b1c47b34 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Tue, 17 Mar 2020 16:41:09 -0700 Subject: [PATCH] Remove GET args from the path passed via proxito header This makes it cleaner and users don't care about them. --- readthedocs/proxito/views/mixins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readthedocs/proxito/views/mixins.py b/readthedocs/proxito/views/mixins.py index 80b6a431893..7fe0759395f 100644 --- a/readthedocs/proxito/views/mixins.py +++ b/readthedocs/proxito/views/mixins.py @@ -124,7 +124,8 @@ def _serve_docs_nginx(self, request, final_project, version_slug, path, download response['X-RTD-Domain'] = request.get_host() response['X-RTD-Project'] = final_project.slug response['X-RTD-Version'] = version_slug - response['X-RTD-Path'] = path + # Needed to strip any GET args, etc. + response['X-RTD-Path'] = urlparse(path).path if hasattr(request, 'rtdheader'): response['X-RTD-Version-Method'] = 'rtdheader' if hasattr(request, 'subdomain'):