mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-13 08:35:08 +01:00
feat: automatically prefix backend url with https:// if not provided
This commit is contained in:
parent
d4463cbccd
commit
9fc3e9082f
@ -208,7 +208,13 @@ export function SettingsPage() {
|
|||||||
// when backend url gets changed, log the user out first
|
// when backend url gets changed, log the user out first
|
||||||
if (state.backendUrl.changed) {
|
if (state.backendUrl.changed) {
|
||||||
await logout();
|
await logout();
|
||||||
setBackendUrl(state.backendUrl.state);
|
|
||||||
|
let url = state.backendUrl.state;
|
||||||
|
if (url && !url.startsWith("http://") && !url.startsWith("https://")) {
|
||||||
|
url = `https://${url}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
setBackendUrl(url);
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
state,
|
state,
|
||||||
|
Loading…
Reference in New Issue
Block a user