Browse Source

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.
pull/208/head
decoder.id 1 year ago
committed by GitHub
parent
commit
ef2604b182
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/views/index.html

2
src/views/index.html

@ -120,7 +120,7 @@
} }
window.http = axios.create({ window.http = axios.create({
baseURL: {{ .AppHost }}
baseURL: `${window.location.protocol}//${window.location.hostname}`
}); });
{{ if isEnableBasicAuth .BasicAuthToken }} {{ if isEnableBasicAuth .BasicAuthToken }}
window.http.defaults.headers.common['Authorization'] = {{ .BasicAuthToken }}; window.http.defaults.headers.common['Authorization'] = {{ .BasicAuthToken }};

Loading…
Cancel
Save