From bf48899a1e44af050c7c7e88add47922488fdb52 Mon Sep 17 00:00:00 2001 From: Clare T Date: Sun, 23 Feb 2025 14:44:23 -0600 Subject: [PATCH] Update guide.md Added neccesary documentation to redirect server-side requests to an external proxy by setting the enviornment variable(s) `HTTPS_PROXY` and/or `HTTP_PROXY`. Included a link to [official Coder documentation](https://coder.com/docs/code-server/FAQ#how-do-i-direct-server-side-requests-through-a-proxy). --- docs/guide.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/guide.md b/docs/guide.md index c2f230ee5eb7..e2e7a2caeb04 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -343,6 +343,18 @@ built-in subpath-based proxy. Note: relative paths are also supported i.e. `VSCODE_PROXY_URI=./proxy/{{port}}` +It may also be neccesary to reroute server side requests through your +reverse proxy as well. This is the preferred method described [here](https://coder.com/docs/code-server/FAQ#how-do-i-direct-server-side-requests-through-a-proxy) +as it will preserve the functionality desrcibed above. This can be done by +configuring the enviornment variable(s) `HTTP_PROXY` and/or `HTTPS_PROXY` to +the address or hostname of your reverse proxy. + +This will also resolve hostnames, including within docker networks. For +example, if your reverse proxy is a Caddy container named `caddy`, on the +same docker network as `code-server`, you could set +`HTTPS_PROXY=https://caddy/` in the `enviornment:` block of the +`compose.yml`. + ### Stripping `/proxy/` from the request path You may notice that the code-server proxy strips `/proxy/` from the