Skip to content

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.

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.

  • Strict-Transport-Security (effective over HTTPS only)
  • X-Content-Type-Options: nosniff
  • Referrer-Policy: strict-origin-when-cross-origin
  • Cache-Control: no-store on HTML result pages — because they contain invoice data
{
"InvoiceApi": {
"PublicBaseUrl": "https://rechnung.firma.de",
"KnownProxies": [ "10.0.0.5" ]
}
}

The options in detail are under Options: mail and network.