Skip to content

Reverse Proxy

Autentico listens on plain HTTP. Always deploy it behind a TLS-terminating reverse proxy in production.

Caddy handles TLS automatically via Let’s Encrypt:

auth.example.com {
reverse_proxy localhost:9999
}

Or with Docker Compose (Autentico on internal network):

auth.example.com {
reverse_proxy autentico:9999
}

If your relying party SPA needs to call the token endpoint from a browser, enable CORS:

AUTENTICO_ENABLE_CORS=true

This adds permissive CORS headers to all responses. For tighter control, handle CORS at the reverse proxy level instead.

The X-Forwarded-For and X-Real-IP headers are logged with each request. Ensure your proxy sets them so the logs reflect real client IPs rather than the proxy’s IP.