Running behind a reverse proxy
The recommended setup: the application speaks plain HTTP and the proxy terminates TLS — IIS, nginx or Caddy. The HTTPS page in the installer then stays empty, and the certificate sits where it is renewed anyway.
Three things belong with it
Section titled “Three things belong with it”1 · Set the public address. PublicBaseUrl to the address users actually call — for instance
https://rechnung.firma.de. It appears in the links in email.
2 · Register the proxy’s address. KnownProxies to the address of the proxy. Only from there are
X-Forwarded-For and X-Forwarded-Proto accepted.
Loopback is trusted in any case; a proxy on the same host needs no entry.
3 · Check health over HTTP. /health against the HTTP port and localhost, not through the
proxy — otherwise a fresh certificate becomes monitoring’s first stumbling block.
What the application sets itself
Section titled “What the application sets itself”Strict-Transport-Security(effective over HTTPS only)X-Content-Type-Options: nosniffReferrer-Policy: strict-origin-when-cross-originCache-Control: no-storeon HTML result pages — because they contain invoice data
What the application does not do
Section titled “What the application does not do”An example configuration
Section titled “An example configuration”{ "InvoiceApi": { "PublicBaseUrl": "https://rechnung.firma.de", "KnownProxies": [ "10.0.0.5" ] }}The options in detail are under Options: mail and network.