From: Christian Hofstaedtler Date: Tue, 12 Jan 2016 09:46:04 +0000 (+0100) Subject: dnsdist: Support command= only on /jsonstat URL X-Git-Tag: dnsdist-1.0.0-alpha2~81^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1dd4c70683f739a6eea47c457a8c421bcd726a97;p=pdns dnsdist: Support command= only on /jsonstat URL --- 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;