Set "location origin" as default "server base url"

This commit is contained in:
schroda
2024-04-26 13:04:21 +02:00
parent 741489ad49
commit 950d240c8a

View File

@@ -87,7 +87,7 @@ export const ServerSettings = () => {
const serverSettings = data ? extractServerSettings(data.settings) : undefined;
const [mutateSettings] = requestManager.useUpdateServerSettings();
const [serverAddress, setServerAddress] = useLocalStorage<string>('serverBaseURL', '');
const [serverAddress, setServerAddress] = useLocalStorage<string>('serverBaseURL', window.location.origin);
const handleServerAddressChange = (address: string) => {
const serverBaseUrl = address.replaceAll(/(\/)+$/g, '');