mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-27 07:48:38 +00:00
fix: fix hard coded https protocol in frontend
This commit is contained in:
parent
0ddabb5f1e
commit
95a48d7489
@ -1,5 +1,5 @@
|
|||||||
import { browser } from '$app/environment'
|
import { browser } from '$app/environment'
|
||||||
import { PUBLIC_APP_DB, PUBLIC_APP_DOMAIN } from '$src/env'
|
import { PUBLIC_APP_DB, PUBLIC_APP_DOMAIN, PUBLIC_APP_PROTOCOL } from '$src/env'
|
||||||
import { logger } from '@pockethost/common'
|
import { logger } from '@pockethost/common'
|
||||||
import {
|
import {
|
||||||
createPocketbaseClient,
|
createPocketbaseClient,
|
||||||
@ -13,7 +13,7 @@ export const client = (() => {
|
|||||||
if (clientInstance) return clientInstance
|
if (clientInstance) return clientInstance
|
||||||
const { info } = logger()
|
const { info } = logger()
|
||||||
info(`Initializing pocketbase client`)
|
info(`Initializing pocketbase client`)
|
||||||
const url = `https://${PUBLIC_APP_DB}.${PUBLIC_APP_DOMAIN}`
|
const url = `${PUBLIC_APP_PROTOCOL}://${PUBLIC_APP_DB}.${PUBLIC_APP_DOMAIN}`
|
||||||
clientInstance = createPocketbaseClient({ url })
|
clientInstance = createPocketbaseClient({ url })
|
||||||
return clientInstance
|
return clientInstance
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user