Add no-accel option to proxy for debugging

pull/219/head
Andrew Godwin 2022-12-20 05:53:34 +00:00
rodzic 5ab5684798
commit 94216f241a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -19,7 +19,7 @@ class BaseProxyView(View):
self.kwargs = kwargs
remote_url = self.get_remote_url()
# See if we can do the nginx trick or a normal forward
if request.headers.get("x-takahe-accel"):
if request.headers.get("x-takahe-accel") and not request.GET.get("no_accel"):
bits = urlparse(remote_url)
redirect_url = (
f"/__takahe_accel__/{bits.scheme}/{bits.hostname}/{bits.path}"