]> granicus.if.org Git - pdns/commitdiff
dnsdist: Support command= only on /jsonstat URL
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Tue, 12 Jan 2016 09:46:04 +0000 (10:46 +0100)
committerRemi Gacogne <rgacogne-github@coredump.fr>
Thu, 14 Jan 2016 08:17:22 +0000 (09:17 +0100)
pdns/dnsdist-web.cc

index ea9aa1df08cd2dc355f2afab05073a292ad88435..dc7ce8f633de1962b80e69ea2f1c31e2bff631a4 100644 (file)
@@ -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;