Fix protocol issues

This commit is contained in:
dragongoose
2023-05-12 10:21:31 -04:00
parent c3fd5cd56d
commit dcb6258a45
8 changed files with 28 additions and 22 deletions

View File

@ -5,6 +5,15 @@ import './assets/index.css'
const app = createApp(App)
// Add protocol variable
// For some reason, import.meta.env.VITE_HTTPS === "true"
// returns false, even if it is true.
// Making a copy of the variable seems to work
const https = (import.meta.env.VITE_HTTPS.slice() === "true")
app.provide('protocol', https ? 'https://' : 'http://')
import { OhVueIcon, addIcons } from 'oh-vue-icons'
import {
IoSearchOutline,
@ -34,4 +43,4 @@ addIcons(
app.component('v-icon', OhVueIcon)
app.use(router)
app.mount('#app')
app.mount('#app')