0
0

🩹 various fixes #15

Merged
thetek42 merged 6 commits from dev into main 2021-07-29 12:55:18 +02:00
Showing only changes of commit 314bee5a84 - Show all commits

View File

@ -20,7 +20,11 @@ function dnswatch_search() {
// send api request
var request = new XMLHttpRequest();
request.open('POST', 'https://dns-watch.org/lookup', true);
request.open('POST',
window.location.hostname === ''
? 'https://dns-watch.org/lookup' // send request to the official website when running the .html locally
: `https://${window.location.hostname}/lookup`, // send request to /lookup if not running locally
true);
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
request.onload = function() {