Fix protocol issues
This commit is contained in:
11
src/main.ts
11
src/main.ts
@ -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')
|
Reference in New Issue
Block a user