rename var

This commit is contained in:
shamoon 2025-05-09 01:15:49 -07:00
parent 8ba3cae921
commit b430a6f515
No known key found for this signature in database
2 changed files with 13 additions and 1 deletions

View File

@ -81,3 +81,15 @@ services:
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
```
## Running homepage behind a proxy
If you are running homepage behind e.g. squid proxy, you can set the environment variable `HOMEPAGE_HTTP_PROXY_URL` to the URL of your proxy. This will allow homepage to use the proxy for all outgoing requests.
```yaml
services:
homepage:
...
environment:
- HOMEPAGE_HTTP_PROXY=http://proxy.local:3128
```

View File

@ -110,7 +110,7 @@ export async function cachedRequest(url, duration = 5, ua = "homepage") {
export async function httpProxy(url, params = {}) {
const constructedUrl = new URL(url);
const proxyUrl = process.env.HOMEPAGE_HTTP_PROXY_URL; // e.g., http://proxy.local:3128
const proxyUrl = process.env.HOMEPAGE_HTTP_PROX; // e.g. http://proxy.local:3128
const disableIpv6 = process.env.HOMEPAGE_PROXY_DISABLE_IPV6 === "true";
const agentOptions = disableIpv6 ? { family: 4, autoSelectFamily: false } : {};