Nginx Security Headers Configuration for Web Applications
Nginx can add important security headers to every response: Strict-Transport-Security to enforce HTTPS, X-Content-Type-Options to stop MIME sniffing, a frame...
Category
Fixes for reverse proxy errors, SSL configuration, and caching issues in Nginx.
Nginx can add important security headers to every response: Strict-Transport-Security to enforce HTTPS, X-Content-Type-Options to stop MIME sniffing, a frame...
To proxy WebSockets through Nginx, use HTTP/1.1 and pass the Upgrade and Connection headers to the backend. Connections are closed when idle longer than...
For stateless APIs, round robin is a sound default in Nginx, and least connections is usually the better choice when request durations vary a lot. Hash-based...
For static assets, the best Nginx setup combines fingerprinted filenames with long-lived Cache-Control headers, so browsers cache files for a long time and...
A request size cap protects proxy and application resources from unexpectedly large uploads. Start with a clearly defined correctness invariant and workload....
HTTP/2 multiplexes requests on a client connection but does not automatically remove backend connection limits. Start with a clearly defined correctness...
Conditional GET requests can avoid transferring unchanged response bodies when validators match. Start with a clearly defined correctness invariant and...
Nginx has separate timeouts for connecting to an upstream, sending a request, and reading a response, and each one applies to a different stage. Its retry...
For JSON APIs, gzip is the safe, universally supported default, while Brotli often compresses slightly better at comparable levels but needs an extra Nginx...