From 7e050925ee3267a66305463268ba6c59e7b6270b Mon Sep 17 00:00:00 2001 From: Hans Ott Date: Fri, 21 Nov 2025 10:29:27 +0100 Subject: [PATCH 1/2] Update proxy documentation for client IP header --- docs/proxy.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/proxy.md b/docs/proxy.md index 2628a3ff3..505d0e743 100644 --- a/docs/proxy.md +++ b/docs/proxy.md @@ -3,3 +3,10 @@ We'll automatically use the `x-forwarded-for` header to determine the client's IP address when behind a proxy. If you're publicly exposing your server without a load balancer in front of it, you should set the `AIKIDO_TRUST_PROXY` env var to `false` to ensure that the correct IP address is used. Otherwise, someone could potentially spoof their IP address by adding the above header and thus bypassing the rate limiting. + +If you need to use a different header to determine the client's IP address, you can set the `AIKIDO_CLIENT_IP_HEADER` environment variable to the name of that header. This will override the default `x-forwarded-for` header. + +```bash +# For DigitalOcean App Platform +AIKIDO_CLIENT_IP_HEADER=do-connecting-ip node app.js +``` From 722b9f107d2b9f8ad5ed2a89b8ae5cb735c33a7f Mon Sep 17 00:00:00 2001 From: bitterpanda Date: Fri, 21 Nov 2025 10:34:02 +0100 Subject: [PATCH 2/2] Update docs/proxy.md --- docs/proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/proxy.md b/docs/proxy.md index 505d0e743..fb4a327de 100644 --- a/docs/proxy.md +++ b/docs/proxy.md @@ -8,5 +8,5 @@ If you need to use a different header to determine the client's IP address, you ```bash # For DigitalOcean App Platform -AIKIDO_CLIENT_IP_HEADER=do-connecting-ip node app.js +AIKIDO_CLIENT_IP_HEADER=do-connecting-ip java -javaagent:... -jar ... ```