From 33ccb708f5ebd39c8f4aa695cddbcf61fc0a5e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Mon, 20 May 2019 20:53:35 +0200 Subject: [PATCH] Use API url relative to current path. --- static/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index 23334b7..40ea94a 100644 --- a/static/index.html +++ b/static/index.html @@ -97,7 +97,7 @@ function load(interval) { let apiKey = document.getElementById('apikey-input').value - fetch(`api/summary?interval=${interval}&live=true`, { + fetch(`${window.location.href}/api/summary?interval=${interval}&live=true`, { method: 'GET', headers: { 'Accept': 'application/json',