mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-21 14:47:41 +01:00
Merge pull request #958 from movie-web/965-backend-https-default
Automatically prefix backend url with https:// if not provided
This commit is contained in:
commit
10fa48ba04
1 changed files with 7 additions and 1 deletions
|
@ -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 a new issue