Преглед изворни кода

bugfix: Logout cookies causing a conflict (#461)

James Read пре 1 година
родитељ
комит
ceb0a78180
1 измењених фајлова са 5 додато и 2 уклоњено
  1. 5 2
      internal/httpservers/restapi.go

+ 5 - 2
internal/httpservers/restapi.go

@@ -116,8 +116,11 @@ func forwardResponseHandlerLogout(md metadata.MD, w http.ResponseWriter) {
 		http.SetCookie(
 			w,
 			&http.Cookie{
-				Name:  "olivetin-sid-local",
-				Value: "",
+				Name:     "olivetin-sid-local",
+				MaxAge:   31556952, // 1 year
+				Value:    "",
+				HttpOnly: true,
+				Path:     "/",
 			},
 		)