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:
sam365724 2022-11-02 19:32:30 +01:00 committed by GitHub
parent a4edfd11f9
commit 8fdbaf4499
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ export class UserService {
this.jwtInfo = None;
this.myUserInfo = None;
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();
}