Fix WebUI
This commit is contained in:
@@ -1387,7 +1387,7 @@ namespace confighttp {
|
||||
sessionCookie = util::hex(crypto::hash(sessionCookieRaw + config::sunshine.salt)).to_string();
|
||||
cookie_creation_time = std::chrono::steady_clock::now();
|
||||
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);
|
||||
fg.disable();
|
||||
|
||||
@@ -379,8 +379,20 @@
|
||||
});
|
||||
});
|
||||
|
||||
this.global_prep_cmd = this.config.global_prep_cmd;
|
||||
this.server_cmd = this.config.server_cmd;
|
||||
if (this.platform === 'windows') {
|
||||
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: {
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
const url = new URL(window.location);
|
||||
const redirectUrl = url.searchParams.get('redir');
|
||||
const hash = url.hash;
|
||||
if (redirectUrl) {
|
||||
if (redirectUrl && redirectUrl.startsWith('.')) {
|
||||
location.href = redirectUrl + hash;
|
||||
} else {
|
||||
location.href = './' + hash;
|
||||
|
||||
Reference in New Issue
Block a user