docs: add Caddy reverse proxy configuration examples - #10344
Conversation
Adds Caddy examples alongside the existing NGINX ones for hosting pgAdmin with Gunicorn or uWSGI, at the root of a server and under a sub-directory. Addresses pgadmin-org#10334, where the root cause turned out to be that a sub-directory deployment needs both the reverse proxy to forward the request path unmodified with an X-Script-Name header, and the SCRIPT_NAME environment variable set on the pgAdmin process itself so APPLICATION_ROOT/SESSION_COOKIE_PATH are correct.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughAdded Caddy deployment documentation for Gunicorn and uWSGI. The examples cover root and ChangesCaddy deployment
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The documentation adds Caddy deployment examples and sub-directory proxy guidance without an identified current merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Caddy's packaged unit sets PrivateTmp=true, so a Gunicorn or uWSGI socket created in the system /tmp is not visible to Caddy and every request fails with a 502.
|
The core of this is genuinely valuable — thanks for writing it up. I verified the central claim: Also good: the Caddy examples get HTTPS automatically, which is better than our existing nginx examples, and The A few things to change before this lands: 1. The examples are documented not to work ( 2. That 3. The nginx examples still have the bug this PR documents ( 4. Please strip Minor:
|
Summary
X-Script-Nameheader, and aSCRIPT_NAMEenvironment variable set on the pgAdmin process itself (a separate, static mechanism that setsAPPLICATION_ROOT/SESSION_COOKIE_PATH).Related: #10334, where the reported "login succeeds then bounces back to the login page" turned out to be caused by the missing
SCRIPT_NAMEprocess environment variable, not by cookie security flags.Test plan
make docsequivalent (targetedsphinx-build) with no new warnings forserver_deployment.rst/pgadmin4behind a local Caddy instance, full browser login → dashboard → reload cycle with no console errors and no redirect loopSummary by CodeRabbit
/pgadmin4subdirectory deployments.PrivateTmp=truesetting.