update
This commit is contained in:
parent
a16316979c
commit
a2929be104
6 changed files with 43 additions and 10 deletions
|
|
@ -21,6 +21,7 @@ systemctl reload nginx
|
|||
This repository is organized by nginx context:
|
||||
|
||||
- `http/`: snippets that must be included inside `http {}`.
|
||||
- `fastcgi/`: FastCGI-specific snippets for `location {}` or `server {}` blocks.
|
||||
- `ssl/`: HTTPS and TLS snippets for `server {}` blocks.
|
||||
- `proxy_pass/`: reverse proxy snippets for `location {}` blocks.
|
||||
- `redirect/`: host and canonical URL redirects for `server {}` blocks.
|
||||
|
|
@ -132,13 +133,16 @@ server {
|
|||
|
||||
- `kit/http/gzip.conf`: gzip compression for common text-based responses. Must be included inside `http {}`.
|
||||
- `kit/http/websocket-map.conf`: defines `$connection_upgrade` for websocket proxying. Must be included inside `http {}`.
|
||||
- `kit/security.conf`: common security headers and host normalization. Intended for `server {}`.
|
||||
- `kit/security.conf`: common low-risk security headers and host normalization. Intended for `server {}`.
|
||||
- `kit/security-legacy.conf`: optional legacy compatibility headers such as `X-Download-Options` and `X-Permitted-Cross-Domain-Policies`.
|
||||
- `kit/fastcgi/hide-powered-by.conf`: hides `X-Powered-By` from FastCGI upstream responses.
|
||||
- `kit/ssl/security.conf`: TLS protocol and session resumption settings. Intended for `server {}`.
|
||||
- `kit/ssl/hsts.conf`: HSTS header for HTTPS responses. Intended for `server {}`.
|
||||
- `kit/ssl/hsts-preload.conf`: HSTS variant with `preload`. Use only if the whole domain tree is preload-safe.
|
||||
- `kit/ssl/force.conf`: redirects HTTP requests to HTTPS. Intended for `server {}`.
|
||||
- `kit/redirect/to-primary-domain.conf`: redirects aliases to the primary `server_name`. Intended for `server {}`.
|
||||
- `kit/proxy_pass/forwarded.conf`: standard reverse proxy headers. Intended for `location {}`.
|
||||
- `kit/proxy_pass/hide-powered-by.conf`: hides `X-Powered-By` from proxied upstream responses.
|
||||
- `kit/proxy_pass/websocket.conf`: websocket upgrade headers. Requires `kit/http/websocket-map.conf`.
|
||||
- `kit/proxy_pass/timeout-300.conf`: longer proxy timeouts. Intended for `location {}`.
|
||||
|
||||
|
|
@ -160,3 +164,4 @@ The script validates:
|
|||
- `gzip_proxied` does not remove `ETag` or `Last-Modified` headers. It only controls when nginx may gzip requests that arrived through another proxy.
|
||||
- `text/html` does not need to appear in `gzip_types`; nginx compresses it automatically.
|
||||
- Gzip over HTTPS can contribute to BREACH-style risk for responses that reflect attacker-controlled input alongside secrets. Keep that in mind for highly sensitive dynamic pages.
|
||||
- `kit/security.conf` intentionally does not set `X-Robots-Tag: none` or `X-XSS-Protection: 1; mode=block`; those are too risky or too obsolete for a default site-wide baseline.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue