Classic Proxy
- Set
CLASSIC_HTTP_TARGET,CLASSIC_HTTPS_TARGET, andCLASSIC_SOCKET_TARGETto point at the classic server’s three listeners. - If only
CLASSIC_TARGETis provided, it is used for all of HTTP, HTTPS, and Socket.IO. - Any requests to
/classic/*on this server are forwarded to the chosen target with the/classicprefix stripped (e.g.,/classic/api->http://127.0.0.1:9090/api). - Works for HTTP(S) requests and WebSocket upgrades (e.g.,
/classic/socket.io/*).
Environment
CLASSIC_HTTP_TARGET: Origin for classic over HTTP (e.g.,http://127.0.0.1:9080).CLASSIC_HTTPS_TARGET: Origin for classic over HTTPS (e.g.,https://127.0.0.1:9443).CLASSIC_SOCKET_TARGET: Origin for classic Socket.IO upgrades (use http/https form; e.g.,https://127.0.0.1:9096).CLASSIC_TARGET: Fallback origin used for all three if the above are not set.
TLS options
CLASSIC_HTTPS_INSECURE: Set totrue/1to allow the proxy to connect to a classic HTTPS target with a self-signed or otherwise untrusted certificate. Use only for local development.CLASSIC_TLS_SERVERNAME: Sets the SNI servername for HTTPS connections to the classic target (e.g., your origin domain). This fixes TLS hostname validation when targeting127.0.0.1with a certificate issued for a domain name.CLASSIC_HTTPS_CA_FILE: Path to a PEM bundle with the issuing CA(s) for the classic HTTPS certificate (e.g., a fullchain). Recommended instead of disabling verification when running with a private CA.CLASSIC_HTTPS_CA: Inline CA bundle in PEM or base64-encoded PEM. Used ifCLASSIC_HTTPS_CA_FILEis not set.
Implementation notes
- The server uses
http-proxy-middlewareto safely proxy fixed paths only:/classic/*,/socket.io/*, and/classic/socket.io/*. - Requests under
/classichave the prefix stripped before forwarding. - Proxying enables
xfwdandchangeOrigin, and supports WebSocket upgrades.