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

This commit is contained in:
Misi
2022-10-06 20:00:54 +02:00
committed by GitHub
parent 5361efc225
commit 1de0f4453e

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()