NixOS: one X-Forwarded-For through the module's nginx, more unit hardening
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
With services.nginx.recommendedProxySettings on, nixpkgs also included its recommended proxy headers in the module's location, so nginx sent X-Forwarded-For twice. The server takes the header only as a single address, so it counted every client as nginx itself, and per-address limits such as sign-in attempts became one limit for everyone. The location now turns recommendedProxySettings off and keeps its own headers, and the NixOS test runs with the global setting on. The services get the Debian units' new hardening: no capabilities, private devices, kernel modules, logs and clock protected, no new namespaces, AF_UNIX/INET/INET6/NETLINK sockets only (Node lists network interfaces over netlink), the @system-service system calls on the native architecture, a locked personality, and umask 0077. docs/nix.md says to open the syslog receiver's port, when it listens on 0.0.0.0, only to the machines that send (it has no TLS or sender authentication), and to remove ADMIN_INITIAL_PASSWORD after signing in. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/a6615966cb4944ffc49c0caf464f55de52ca7013
Open NixOS: one X-Forwarded-For through the module's nginx, more unit hardening in the timeline