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:
parent
b1edf84a7c
commit
6aa17532da
12 changed files with 98 additions and 84 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue