mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
🧱 Try to fix cookies issues
This commit is contained in:
@@ -26,7 +26,7 @@ export default function ConfigChanger() {
|
||||
label="Config loader"
|
||||
onChange={(e) => {
|
||||
loadConfig(e ?? 'default');
|
||||
setCookies('config-name', e ?? 'default', { maxAge: 60 * 60 * 24 * 30 });
|
||||
setCookies('config-name', e ?? 'default', { maxAge: 60 * 60 * 24 * 30, sameSite: 'strict' });
|
||||
}}
|
||||
data={
|
||||
// If config list is empty, return the current config
|
||||
|
||||
@@ -90,7 +90,10 @@ export default function LoadConfigComponent(props: any) {
|
||||
icon: <Check />,
|
||||
message: undefined,
|
||||
});
|
||||
setCookies('config-name', newConfig.name, { maxAge: 60 * 60 * 24 * 30 });
|
||||
setCookies('config-name', newConfig.name, {
|
||||
maxAge: 60 * 60 * 24 * 30,
|
||||
sameSite: 'strict',
|
||||
});
|
||||
const migratedConfig = migrateToIdConfig(newConfig);
|
||||
setConfig(migratedConfig);
|
||||
});
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function AuthenticationTitle() {
|
||||
onSubmit={form.onSubmit((values) => {
|
||||
setCookies('password', values.password, {
|
||||
maxAge: 60 * 60 * 24 * 30,
|
||||
sameSite: 'strict',
|
||||
sameSite: 'lax',
|
||||
});
|
||||
showNotification({
|
||||
id: 'load-data',
|
||||
|
||||
Reference in New Issue
Block a user