mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 11:21:26 +00:00
Fix workaround for broken logout (#836)
Use hostname without port for setting empty cookie, avoids error in browser: Cookie “jwt” has been rejected for invalid domain.
This commit is contained in:
parent
a4edfd11f9
commit
8fdbaf4499
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ export class UserService {
|
||||||
this.jwtInfo = None;
|
this.jwtInfo = None;
|
||||||
this.myUserInfo = None;
|
this.myUserInfo = None;
|
||||||
IsomorphicCookie.remove("jwt"); // TODO is sometimes unreliable for some reason
|
IsomorphicCookie.remove("jwt"); // TODO is sometimes unreliable for some reason
|
||||||
document.cookie = "jwt=; Max-Age=0; path=/; domain=" + location.host;
|
document.cookie = "jwt=; Max-Age=0; path=/; domain=" + location.hostname;
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue