Skip to content

Reverse Proxy & TLS

Never expose port 3080 directly to the public internet over plain HTTP. Keep GatherGate bound to 127.0.0.1:3080 and terminate TLS at a reverse proxy.

Set these two variables in .env whenever GatherGate sits behind a reverse proxy:

BASE_URL=https://intake.yourfirm.com.au
TRUST_PROXY=true
  • BASE_URL starting with https:// instructs GatherGate to mark gg_session and client OTP cookies Secure and generate HTTPS magic links.
  • TRUST_PROXY=true allows per-IP rate limiting on /api/login, OTP, and uploads to inspect the client IP forwarded by your proxy.

Caddy provisions and renews Let’s Encrypt TLS certificates automatically:

Caddyfile
intake.yourfirm.com.au {
request_body {
max_size 64MB
}
reverse_proxy 127.0.0.1:3080
}
  1. Verify https://intake.yourfirm.com.au/healthz returns 200 OK.
  2. Open DevTools > Application > Cookies after signing in and confirm gg_session has HttpOnly, Secure, and SameSite=Lax.
  3. Upload a multi-megabyte PDF to confirm your proxy body size limit allows files up to 50 MB.