Chore: Make NewCookieOptions exported in cookies.go (#56476) (#56499)

(cherry picked from commit 1de0f4453e)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-10-07 10:40:03 +02:00
committed by GitHub
co-authored by Misi
parent 17655071b7
commit 4ac54040a9
+2 -2
View File
@@ -16,7 +16,7 @@ type CookieOptions struct {
SameSiteMode http.SameSite
}
func newCookieOptions() CookieOptions {
func NewCookieOptions() CookieOptions {
path := "/"
if len(setting.AppSubUrl) > 0 {
path = setting.AppSubUrl
@@ -37,7 +37,7 @@ func DeleteCookie(w http.ResponseWriter, name string, getCookieOptions getCookie
func WriteCookie(w http.ResponseWriter, name string, value string, maxAge int, getCookieOptions getCookieOptionsFunc) {
if getCookieOptions == nil {
getCookieOptions = newCookieOptions
getCookieOptions = NewCookieOptions
}
options := getCookieOptions()