mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-11-01 15:53:03 -06:00
Adds Caddy examples alongside the existing NGINX ones for hosting pgAdmin with Gunicorn or uWSGI, both at the root of a server and under a sub-directory, mirroring the structure of the NGINX sections. Caddy does not speak the native uwsgi protocol, so its uWSGI examples run uWSGI in HTTP mode instead. Documents the two things that must line up for a sub-directory deployment behind any reverse proxy: the proxy forwarding the request path unmodified with an X-Script-Name header, and a SCRIPT_NAME environment variable on the pgAdmin process itself, which is read at startup to set APPLICATION_ROOT and SESSION_COOKIE_PATH. The missing environment variable is what caused the "login succeeds then bounces back to the login page" report in #10334. Also notes that pgAdmin trusts X-Script-Name and X-Scheme unconditionally, unlike the X-Forwarded-* headers, so every example now either overwrites or clears both rather than passing on whatever the client sent; warns that the systemd unit shipped with Caddy sets PrivateTmp=true, which hides a socket created in the system /tmp; and refreshes the stale python3.7 paths.