]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
recuweb: remove api-key from interface, can just use basic auth 7489/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Fri, 15 Feb 2019 21:22:20 +0000 (22:22 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Tue, 21 May 2019 12:28:34 +0000 (14:28 +0200)
pdns/recursordist/html/index.html
pdns/recursordist/html/local.js

index c913094e46729ce129a3f189aff6c694bef06437..2624b90fa5fb77b59e8a9d76ca0a8b520f0da983 100644 (file)
@@ -22,9 +22,7 @@
 <!-- ========================= CONTENT ========================= -->
 
 <div class="topbar">
-    <label>API Key: <input type="password" id="password" value=""></label>
-    <button>Submit</button><!-- Just a trick to make the user click outside of the input field -->
-    <span id="connection-status" style="display:none">No server connection or incorrect key</span>
+    <span id="connection-status" style="display:none">No server connection</span>
     <span id="connection-error"></span>
 </div>
 
index 9e6fc03190c29b6e6cc8712f30e59f174a34cc0d..549102c0e2c139c61315e6de0b8072df5ab59dd1 100644 (file)
@@ -21,12 +21,6 @@ $(document).ready(function () {
         $('#' + name).html(h);
     };
 
-    var password = $("#password").val();
-    $("#password").change(function (e) {
-        password = $("#password").val();
-        update();
-    });
-
     var qpsgraph = new Rickshaw.Graph({
         element: document.getElementById("qpschart"),
         width: 400,
@@ -70,7 +64,6 @@ $(document).ready(function () {
 
     var jsonstatParams = function (command, name, filtered) {
         var d = {
-            'api-key': password,
             'command': command,
             'name': name
         };
@@ -159,7 +152,7 @@ $(document).ready(function () {
 
     function update() {
         $.ajax({
-            url: 'api/v1/servers/localhost/statistics?api-key=' + password,
+            url: 'api/v1/servers/localhost/statistics',
             type: 'GET',
             dataType: 'json',
             success: function (adata, x, y) {
@@ -216,7 +209,7 @@ $(document).ready(function () {
 
         if (!version) {
             $.ajax({
-                url: 'api/v1/servers/localhost?api-key=' + password, type: 'GET', dataType: 'json',
+                url: 'api/v1/servers/localhost', type: 'GET', dataType: 'json',
                 success: function (data) {
                     version = "PowerDNS " + data["daemon_type"] + " " + data["version"];
                 }