mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-29 17:58:27 +00:00
web/session: don't expect a trailing slash in DEFAULT_URL
This commit is contained in:
parent
3336210e93
commit
a49a87544c
|
@ -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