We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 37ef301 + 83f4089 commit ceb1578Copy full SHA for ceb1578
frontend/src/routes/+layout.svelte
@@ -12,13 +12,14 @@
12
import User from '$lib/components/User/User.svelte';
13
import SomethingWentWrong from '$lib/components/SomethingWentWrong/SomethingWentWrong.svelte';
14
import SplashLoading from '$lib/components/SplashLoading/SplashLoading.svelte';
15
+ import { page } from '$app/stores';
16
17
let contextProviderProps: AsyncResult<UnityAuthContextProviderProps> = ASYNC_IN_PROGRESS;
18
19
async function initLibre311ContextProps() {
20
try {
21
const mode: Mode = getModeFromEnv(import.meta.env);
- const unityAuthBaseURL = String(import.meta.env.VITE_BACKEND_URL ?? '') || '/api';
22
+ const unityAuthBaseURL = String(import.meta.env.VITE_BACKEND_URL ?? '') || $page.url.origin;
23
24
const ctxProps: UnityAuthContextProviderProps = {
25
mode: mode,
0 commit comments