Fix WebUI
This commit is contained in:
@@ -1387,7 +1387,7 @@ namespace confighttp {
|
|||||||
sessionCookie = util::hex(crypto::hash(sessionCookieRaw + config::sunshine.salt)).to_string();
|
sessionCookie = util::hex(crypto::hash(sessionCookieRaw + config::sunshine.salt)).to_string();
|
||||||
cookie_creation_time = std::chrono::steady_clock::now();
|
cookie_creation_time = std::chrono::steady_clock::now();
|
||||||
const SimpleWeb::CaseInsensitiveMultimap headers {
|
const SimpleWeb::CaseInsensitiveMultimap headers {
|
||||||
{ "Set-Cookie", "auth=" + sessionCookieRaw + "; Secure; Max-Age=2592000; Path=/" }
|
{ "Set-Cookie", "auth=" + sessionCookieRaw + "; Secure; SameSite=Strict; Max-Age=2592000; Path=/" }
|
||||||
};
|
};
|
||||||
response->write(headers);
|
response->write(headers);
|
||||||
fg.disable();
|
fg.disable();
|
||||||
|
|||||||
@@ -379,8 +379,20 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.global_prep_cmd = this.config.global_prep_cmd;
|
if (this.platform === 'windows') {
|
||||||
this.server_cmd = this.config.server_cmd;
|
this.global_prep_cmd = this.config.global_prep_cmd.map((i) => {
|
||||||
|
i.elevated = !!i.elevated
|
||||||
|
return i
|
||||||
|
});
|
||||||
|
this.server_cmd = this.config.server_cmd.map((i) => {
|
||||||
|
i.elevated = !!i.elevated
|
||||||
|
return i
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.global_prep_cmd = this.config.global_prep_cmd;
|
||||||
|
this.server_cmd = this.config.server_cmd;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
const url = new URL(window.location);
|
const url = new URL(window.location);
|
||||||
const redirectUrl = url.searchParams.get('redir');
|
const redirectUrl = url.searchParams.get('redir');
|
||||||
const hash = url.hash;
|
const hash = url.hash;
|
||||||
if (redirectUrl) {
|
if (redirectUrl && redirectUrl.startsWith('.')) {
|
||||||
location.href = redirectUrl + hash;
|
location.href = redirectUrl + hash;
|
||||||
} else {
|
} else {
|
||||||
location.href = './' + hash;
|
location.href = './' + hash;
|
||||||
|
|||||||
Reference in New Issue
Block a user