1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-27 14:33:52 +01:00

Make ping relative, so it works on proxied servers

This commit is contained in:
Mark de Bruijn
2024-02-14 09:35:27 +01:00
parent 7ac76b2c59
commit a35db59bba

View File

@@ -210,7 +210,7 @@ function getServerTime() {
function sendPingRequest() { function sendPingRequest() {
const startTime = new Date().getTime(); const startTime = new Date().getTime();
fetch('/ping') fetch('./ping')
.then(response => { .then(response => {
const endTime = new Date().getTime(); const endTime = new Date().getTime();
const pingTime = endTime - startTime; const pingTime = endTime - startTime;