2 files changed
+45
-2
No files matched your search
@@ -45,6 +45,8 @@ curl -H "X-Proxy-Token: YOUR_SECRET" http://localhost:8080/elevenlabs/v1/voices
|
||||
| /elevenlabs/ | https://api.elevenlabs.io |
|
||||
| /openai/ | https://api.openai.com |
|
||||
| /telegram/ | https://api.telegram.org |
|
||||
| /openrouter/ | https://openrouter.ai/api/v1|
|
||||
| /deepseek/ | https://api.deepseek.com |
|
||||
| /health | local health check (no auth)|
|
||||
|
||||
---
|
||||
@@ -203,6 +205,6 @@ docker inspect --format='{{.State.Health.Status}}' api-proxy
|
||||
|
||||
1. A k8s pod sends an HTTP request to `http://<proxy-vm>:8080/elevenlabs/v1/text-to-speech/...` with the `X-Proxy-Token` header and the original API key.
|
||||
2. Nginx checks the source IP against `ALLOWED_CIDR` and validates `X-Proxy-Token` — rejecting with 403 if either fails.
|
||||
3. The prefix (`/elevenlabs/`, `/openai/`, `/telegram/`) is stripped via rewrite, and the request is forwarded over HTTPS to the upstream with SNI enabled.
|
||||
3. The prefix (`/elevenlabs/`, `/openai/`, `/telegram/`, `/openrouter/`, `/deepseek/`) is stripped via rewrite, and the request is forwarded over HTTPS to the upstream with SNI enabled.
|
||||
4. `X-Proxy-Token` and all IP-leaking headers are removed before forwarding; API keys pass through unchanged.
|
||||
5. The response streams back unbuffered to the pod — critical for binary audio data and long-polling (Telegram).
|
||||
Reference in new issue
Block a user