You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MK8S-25: Disable HTTP directory listing for RPM repository
Security fix to prevent exposing repository structure on port 8080.
- Changed autoindex from on to off in nginx configuration.
- Use nginx location directives to return 200 for health checks instead of index files
This maintains the original health check functionality while preventing
directory structure exposure.
The nginx location = / and location = /saltenv/ directives handle health
check requests with 200 status, while location / handles all other requests
with autoindex off for security.
The nginx.conf.j2 template uses the archives variable to generate
location directives for each saltenv, but the variable wasn't being
passed in the template context. This caused Salt unit tests to fail.
The creation of index.html files was tried but it creates a chicken and
egg issue during the container startup when the files were not present.
Plus this approach is much more simple, no code, not so much salt, only
plain configuration.
Related: RD-680
0 commit comments