mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-24 12:08:55 +01:00
web/session: don't expect a trailing slash in DEFAULT_URL
This commit is contained in:
parent
3336210e93
commit
a49a87544c
2 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@ import settings from "$lib/state/settings";
|
|||
|
||||
export const currentApiURL = () => {
|
||||
if (env.DEFAULT_API && get(settings).processing.allowDefaultOverride) {
|
||||
return env.DEFAULT_API;
|
||||
return new URL(env.DEFAULT_API).origin;
|
||||
}
|
||||
return apiURL;
|
||||
return new URL(apiURL).origin;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import { cachedSession } from "$lib/state/session";
|
|||
import type { CobaltSessionResponse, CobaltErrorResponse } from "$lib/types/api";
|
||||
|
||||
export const requestSession = async() => {
|
||||
const apiEndpoint = `${currentApiURL()}session`;
|
||||
const apiEndpoint = `${currentApiURL()}/session`;
|
||||
|
||||
let requestHeaders = {};
|
||||
|
||||
|
|
Loading…
Reference in a new issue