Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions restapi/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func NewSessionCookieForConsole(token string) http.Cookie {
expiration := time.Now().Add(SessionDuration)

return http.Cookie{
Path: "/api", // browser will send cookie only for HTTP request under api path
Path: "/",
Name: "token",
Value: token,
MaxAge: int(SessionDuration.Seconds()), // 45 minutes
Expand All @@ -125,7 +125,7 @@ func NewSessionCookieForConsole(token string) http.Cookie {

func ExpireSessionCookie() http.Cookie {
return http.Cookie{
Path: "/api", // browser will send cookie only for HTTP request under api path
Path: "/",
Name: "token",
Value: "",
MaxAge: -1,
Expand Down