Downgrade gorilla sessions preventing the publishing by traefik hub temporarily.

This commit is contained in:
2024-12-10 10:19:34 +00:00
parent 8101fb2bf6
commit a6fa4d8789
15 changed files with 205 additions and 149 deletions
+21
View File
@@ -0,0 +1,21 @@
//go:build go1.11
// +build go1.11
package sessions
import "net/http"
// newCookieFromOptions returns an http.Cookie with the options set.
func newCookieFromOptions(name, value string, options *Options) *http.Cookie {
return &http.Cookie{
Name: name,
Value: value,
Path: options.Path,
Domain: options.Domain,
MaxAge: options.MaxAge,
Secure: options.Secure,
HttpOnly: options.HttpOnly,
SameSite: options.SameSite,
}
}