mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 03:34:15 -06:00
Chore: Make NewCookieOptions exported in cookies.go (#56476)
This commit is contained in:
parent
5361efc225
commit
1de0f4453e
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user