From ef2604b1822422b9143ed4c7563fdea0c9e68215 Mon Sep 17 00:00:00 2001 From: "decoder.id" <75539501+decoderid@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:39:01 +0700 Subject: [PATCH] feat: HTTPS & HTTP Problem Axios Request (#203) * Update index.html Instead of using .AppHost, there will be issues when using a domain, for example, Cloudflare HTTPS, while on the host side using HTTP requests. * HTTPS & HTTP Problem Axios Request Instead of using .AppHost, there will be issues when using a domain, for example, Cloudflare HTTPS, while on the host side using HTTP requests. --- src/views/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/index.html b/src/views/index.html index 8f3c029..83321d0 100644 --- a/src/views/index.html +++ b/src/views/index.html @@ -120,7 +120,7 @@ } window.http = axios.create({ - baseURL: {{ .AppHost }} + baseURL: `${window.location.protocol}//${window.location.hostname}` }); {{ if isEnableBasicAuth .BasicAuthToken }} window.http.defaults.headers.common['Authorization'] = {{ .BasicAuthToken }}; @@ -226,4 +226,4 @@ }).mount('#app') - \ No newline at end of file +