Proxy
Proxy configuration#
Every setting is optional — the proxy runs correctly with no .env at all.
To change something:
cp .env.example .env| Variable | Default | What it does |
|---|---|---|
PORT | 3000 | Port to listen on. |
ALLOWED_ORIGINS | all | Sites allowed to use the proxy, comma-separated. |
MAX_CONCURRENT_FETCHES | 500 | Requests in flight at once. Lower it if memory runs out. |
DISABLE_STREAMING | false | true turns off video playback and serves only /. |
PROXY_PLAYBACK_TIMEOUT_MS | 20000 | How long to wait for a video server, in ms. |
Keep PROXY_PLAYBACK_TIMEOUT_MS generous. A slow video server that answers
late still plays, one that times out looks dead to the player.
Memory#
The proxy buffers response bodies, and video bodies are large. Give the container a hard memory limit — without one, a bad hour of buffered streams is what takes the host down rather than the proxy.
deploy:
resources:
limits:
memory: 640M