-
-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing "hostname" key in logs #515
Comments
Related issue corazawaf/coraza-caddy#35 |
Current situation and Coraza/Modsec comparison:ModSec v3:
Currently Coraza:
Possible FixesSERVER_NAME:
Logs:
I'm happy to work on it, I just want to agree on the implementation. At first sight, I would go for adding one field to |
This issue is stale because it has been open for 30 days with no activity. |
@fuomag9 @mac-chaffee we just medged the fixing PR. Could you please test it? |
The merged PR aligns the |
Description
As discovered here: jcmoraisjr/haproxy-ingress#964 (comment)
Logs appear to be missing the hostname key (newlines inserted for visibility):
If I'm reading the code correctly, that log value is always set to an empty string:
coraza/internal/corazarules/rule_match.go
Lines 123 to 139 in 9d003ed
When multiple sites are fronted by a single server running Coraza, you need the hostname field to tell which site triggered the rule.
Since Coraza scans the headers anyway, it might be possible to just grab the
Host
header to populate thathostname
field. HTTP says that header is required anyway.The text was updated successfully, but these errors were encountered: