diff --git a/back/dashboard.cgi b/back/dashboard.cgi index 93686f8..22bc931 100755 --- a/back/dashboard.cgi +++ b/back/dashboard.cgi @@ -21,6 +21,9 @@ case "${REQUEST_METHOD}" in # Delete peer 'DELETE') "${LIB_DIR}/peer_del" "${HTTP_X_REAL_IP}" "${QUERY_STRING}";; + # Needed for CORS preflight + 'OPTIONS') "${LIB_DIR}/http_res" 200;; + # Bad request *) printf 'Invalid HTTP verb' | "${LIB_DIR}/http_res" 405;; diff --git a/front/dashboard.js b/front/dashboard.js index 09ecd17..02ba485 100644 --- a/front/dashboard.js +++ b/front/dashboard.js @@ -87,7 +87,6 @@ function PeerList() { self.delPeer = async (peer) => { if (confirm(`Are you sure you want to delete ${peer.name}?`)) { peer.isDeleting(true) - console.log(`Deleting ${peer.pubkey}`) const url = `${API_URL}/?t=${self.token}&pubkey=${peer.pubkey}` try { const res = await fetch(url, {method: 'DELETE'})