From 1f36b3e8961d65a4c2ae9b040dc9646436498a73 Mon Sep 17 00:00:00 2001 From: akuma06 Date: Tue, 6 Jun 2017 23:28:54 +0200 Subject: [PATCH] Set the path to "/" --- router/publicSettingsHandler.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/router/publicSettingsHandler.go b/router/publicSettingsHandler.go index c11dde60..10d43902 100644 --- a/router/publicSettingsHandler.go +++ b/router/publicSettingsHandler.go @@ -81,10 +81,10 @@ func ChangePublicSettingsHandler(w http.ResponseWriter, r *http.Request) { userService.UpdateRawUser(&user) } // Set cookie - http.SetCookie(w, &http.Cookie{Name: "lang", Value: lang, Domain: getDomainName(), Expires: timeHelper.FewDaysLater(365)}) - http.SetCookie(w, &http.Cookie{Name: "theme", Value: theme, Domain: getDomainName(), Expires: timeHelper.FewDaysLater(365)}) - http.SetCookie(w, &http.Cookie{Name: "mascot", Value: mascot, Domain: getDomainName(), Expires: timeHelper.FewDaysLater(365)}) - http.SetCookie(w, &http.Cookie{Name: "mascot_url", Value: mascotURL, Domain: getDomainName(), Expires: timeHelper.FewDaysLater(365)}) + http.SetCookie(w, &http.Cookie{Name: "lang", Value: lang, Domain: getDomainName(), Path: "/", Expires: timeHelper.FewDaysLater(365)}) + http.SetCookie(w, &http.Cookie{Name: "theme", Value: theme, Domain: getDomainName(), Path: "/", Expires: timeHelper.FewDaysLater(365)}) + http.SetCookie(w, &http.Cookie{Name: "mascot", Value: mascot, Domain: getDomainName(), Path: "/", Expires: timeHelper.FewDaysLater(365)}) + http.SetCookie(w, &http.Cookie{Name: "mascot_url", Value: mascotURL, Domain: getDomainName(), Path: "/", Expires: timeHelper.FewDaysLater(365)}) url, _ := Router.Get("home").URL() http.Redirect(w, r, url.String(), http.StatusSeeOther)