Pass --fix-config nginx, --fix-config caddy, or --fix-config apache to turn actual findings from your scan into copy-paste server directives.
Instead of printing a generic boilerplate template, fix_config.rs reads the set of findings detected for your target URL (TLS-NO-HTTPS, HDR-HSTS-MISSING, HDR-CSP-MISSING, exposed dotfiles, and missing isolation headers) and prints only the directives needed to resolve them.
web-vuln-scanner https://example.com --fix-config nginx
web-vuln-scanner https://example.com --fix-config caddy
web-vuln-scanner https://example.com --fix-config apache
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Content-Security-Policy "default-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self'" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
location ~ /\. { deny all; return 404; }
By default Nginx omits add_header directives on 4xx and 5xx HTTP responses. Adding always makes security headers appear on error pages and API responses as well.
No. The scanner only prints the recommended block to stdout and includes it inside saved reports so operators review changes before reloading their proxy.
Verify every directive after reloading Nginx, Caddy, or Apache.
Tune Content Security Policy exceptions safely for web apps.
Check whether dotfile deny rules block /.git/HEAD and /.env.