Skip to content

Commit

Permalink
bug: tweak defaults, it's a good idea to include the remote address i…
Browse files Browse the repository at this point in the history
…n the cache key so 401s don't get cached for valid users with similiar user agents
  • Loading branch information
troyxmccall committed Jan 17, 2024
1 parent 677aa0c commit 385d23c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modsecurity.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ func CreateConfig() *Config {
CacheConditionsNoBody: boolPtr(true),

CacheKeyIncludeHost: boolPtr(true),
CacheKeyIncludeHeaders: boolPtr(false),
CacheKeyHeaders: []string{"Authorization", "User-Agent", "Cache-Control"},
CacheKeyIncludeRemoteAddress: boolPtr(false),
CacheKeyIncludeHeaders: boolPtr(true),
CacheKeyHeaders: []string{"User-Agent"},
CacheKeyIncludeRemoteAddress: boolPtr(true),
}

finalize := Config{
Expand Down

0 comments on commit 385d23c

Please sign in to comment.