Skip to content

Allow all conforming Content-Type values#222

Merged
mie-jcrandal merged 2 commits intomainfrom
rgingras/fix/221-modsecurity-tuning
Mar 6, 2026
Merged

Allow all conforming Content-Type values#222
mie-jcrandal merged 2 commits intomainfrom
rgingras/fix/221-modsecurity-tuning

Conversation

@runleveldev
Copy link
Collaborator

This pull request updates the ModSecurity Core Rule Set configuration for the agent image to improve maintainability and make rule exclusions more flexible. The most significant change is the introduction of a new exclusion rules file, which allows for easier customization of security rule behavior for the cluster. Additionally, the previous custom content-type allowance has been removed in favor of managing such exceptions in the new exclusion file.

ModSecurity configuration improvements:

  • Added RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf to the agent image, providing a dedicated place for local rule exclusions and customizations, including disabling specific rules (such as 920420 for Content-Type enforcement) and offering examples for further customization. [1] [2]
  • Removed the custom SecAction in crs-setup.conf that previously allowed additional content types (e.g., application/x-protobuf), shifting responsibility for such changes to the new exclusion rules file for better maintainability and clarity.

@runleveldev runleveldev linked an issue Mar 4, 2026 that may be closed by this pull request
@mie-jcrandal mie-jcrandal merged commit 091053c into main Mar 6, 2026
5 of 8 checks passed
@mie-jcrandal mie-jcrandal deleted the rgingras/fix/221-modsecurity-tuning branch March 6, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WAF is blocking the request

2 participants