From 0665b7e62ac8da5576d2124e8e36a9ccee7b8aa6 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 2 Dec 2015 11:17:38 +0100 Subject: [PATCH] Redirect to the path of the request, not the root If you proxy at e.g. /auth, redirecting to / 'breaks' the flow. --- pdns/ws-auth.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index 16df5ec17..c30176448 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -206,7 +206,7 @@ void AuthWebServer::indexfunction(HttpRequest* req, HttpResponse* resp) if (S.ringExists(req->getvars["resetring"])) S.resetRing(req->getvars["resetring"]); resp->status = 301; - resp->headers["Location"] = "/"; + resp->headers["Location"] = req->url.path; return; } if(!req->getvars["resizering"].empty()){ @@ -214,7 +214,7 @@ void AuthWebServer::indexfunction(HttpRequest* req, HttpResponse* resp) if (S.ringExists(req->getvars["resizering"]) && size > 0 && size <= 500000) S.resizeRing(req->getvars["resizering"], atoi(req->getvars["size"].c_str())); resp->status = 301; - resp->headers["Location"] = "/"; + resp->headers["Location"] = req->url.path; return; } -- 2.40.0