fix: Dynamic cookie domain not working (#731)

* Fix cookieDynamicDomain option not being set in Options struct

* Fix using wrong cookie name when using dynamic cookie domains

* Adjust testcases for new cookie option structs

* Add known words to expect.txt and change typo in Zombocom

* Cleanup expect.txt

* Add changes to changelog

* Bump versions of grpc and apimachinery

* Fix testcases and add additional condition for dynamic cookie domain
This commit is contained in:
Martin 2025-06-29 21:38:55 +02:00 committed by GitHub
parent b1edf84a7c
commit 6aa17532da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 98 additions and 84 deletions

View file

@ -35,7 +35,6 @@ type Options struct {
CookieDynamicDomain bool
CookieDomain string
CookieExpiration time.Duration
CookieName string
CookiePartitioned bool
BasePrefix string
WebmasterEmail string
@ -102,12 +101,6 @@ func New(opts Options) (*Server, error) {
anubis.BasePrefix = opts.BasePrefix
cookieName := anubis.CookieName
if opts.CookieDomain != "" {
cookieName = anubis.WithDomainCookieName + opts.CookieDomain
}
result := &Server{
next: opts.Next,
ed25519Priv: opts.ED25519PrivateKey,
@ -116,7 +109,6 @@ func New(opts Options) (*Server, error) {
opts: opts,
DNSBLCache: decaymap.New[string, dnsbl.DroneBLResponse](),
OGTags: ogtags.NewOGTagCache(opts.Target, opts.Policy.OpenGraph),
cookieName: cookieName,
}
mux := http.NewServeMux()