From 1dd4c70683f739a6eea47c457a8c421bcd726a97 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Tue, 12 Jan 2016 10:46:04 +0100 Subject: [PATCH] dnsdist: Support command= only on /jsonstat URL --- pdns/dnsdist-web.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index ea9aa1df0..dc7ce8f63 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -74,7 +74,7 @@ static void connectionThread(int sock, ComboAddress remote, string password) resp.headers["WWW-Authenticate"] = "basic realm=\"PowerDNS\""; } - else if(command=="stats") { + else if(req.url.path=="/jsonstat" && command=="stats") { resp.status=200; auto obj=Json::object { @@ -98,7 +98,7 @@ static void connectionThread(int sock, ComboAddress remote, string password) resp.headers["Content-Type"] = "application/json"; resp.body=my_json.dump(); } - else if(command=="dynblocklist") { + else if(req.url.path=="/jsonstat" && command=="dynblocklist") { resp.status=200; Json::object obj; -- 2.40.0