mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-19 11:09:42 +00:00
Merge pull request #1686 from cesanta/device-dashboard
Fix SameSite cookie value
This commit is contained in:
2 files changed
+2143
-965
No files matched your search
+2141
-963
File diff suppressed because it is too large.
Load diff
@@ -339,14 +339,14 @@ const App = function(props) {
|
||||
};
|
||||
|
||||
const login = function(u) {
|
||||
document.cookie = `access_token=${u.token};path=/;max-age=3600`;
|
||||
document.cookie = `access_token=${u.token}; Secure, HttpOnly; SameSite=Lax; path=/; max-age=3600`;
|
||||
setUser(u.user);
|
||||
watch();
|
||||
return getconfig();
|
||||
};
|
||||
|
||||
const logout = ev => {
|
||||
document.cookie = `access_token=;path=/;max-age=0`;
|
||||
document.cookie = `access_token=; Secure, HttpOnly; SameSite=Lax; path=/; max-age=0`;
|
||||
setUser('');
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user