Update gixy nginx config checker#2093
Conversation
|
|
||
| # monitoring, requires authentication, override headers, since CSP is too strict | ||
| location /grafana { | ||
| add_header_inherit off; |
There was a problem hiding this comment.
The include below both have add_headers, therefore the default behaviour seems okay:
There could be several
add_headerdirectives. These directives are inherited from the previous configuration level if and only if there are noadd_headerdirectives defined on the current level. Inheritance rules can be redefined with theadd_header_inheritdirective (1.29.3).
Is the additional add_header_inherit really needed?
There was a problem hiding this comment.
The new gixy-ng (https://github.com/dvershinin/gixy) fails on the current config because of the double headers https://github.com/internetstandards/Internet.nl/actions/runs/27760088839/job/82132454086#step:14:107. Maybe we can mark them so they are ignored (https://github.com/dvershinin/gixy/blob/master/docs/en/configuration.md)?. The only other issue found was a HSTS age of 0 which we also want to ignore. So the newer gixy didn't find anything interesting, maybe in future changes it might?
There was a problem hiding this comment.
Problem: [add_header_redefinition] Nested "add_header" drops parent headers.
Which is all by design, and the first time you work with nginx will find this out. I don't really get the warning, but I think we could add change:
Lines 313 to 315 in a5f620d
To add
-skips:
${DOCKER_COMPOSE_CMD} exec webserver /opt/gixy/bin/gixy -skips hsts_header,add_header_redefinition /etc/nginx/nginx.conf Another question, shouldn't it be better if this would move to lint/check? (although it's way easier to integrate here I guess).
There was a problem hiding this comment.
I don't like disabling tests all out because then we might miss valid issues in the future. But then again, we don't have these checks at all with the current gixy.
I think I put it into integrationtest originally because it needs the container to render the config from the templates at runtime and lint/test is more for static tests.
There was a problem hiding this comment.
I pushed the code just a few minutes before your comment. I agree, but is it possible on line level?
Does it still complain if add_header_inherit on; is set on http level (the highest level)?
Then maybe only HSTS can be skipped, until #324 is fixed.
sed -ir '/add_header_inherit/d' docker/webserver/nginx_templates/default.conf.template
|
@aequitas gixy also complains about nginx .. and this is the original/default
Ignore another one? |
|
It kind of weird, because we do not set |
No description provided.