From 57c3e9f1b2c1d685472670b8ba2660144d2ae316 Mon Sep 17 00:00:00 2001 From: Henri Vasserman Date: Fri, 28 Mar 2025 19:38:34 +0200 Subject: Change how to make Anubis work without a reverse proxy (#86) * Change how to make Anubis work without a reverse proxy * Apply suggestions from code review Co-authored-by: Xe Iaso Signed-off-by: Henri Vasserman * add support for unix sockets. * add env var docs * lib: fix tests Signed-off-by: Xe Iaso --------- Signed-off-by: Henri Vasserman Signed-off-by: Xe Iaso Co-authored-by: Xe Iaso --- docs/docs/CHANGELOG.md | 1 + docs/docs/admin/installation.mdx | 1 + 2 files changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index a3116b8..9898eec 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Changed `--debug-x-real-ip-default` to `--use-remote-address`, getting the IP address from the request's socket address instead. - DroneBL lookups have been disabled by default ## v1.15.0 diff --git a/docs/docs/admin/installation.mdx b/docs/docs/admin/installation.mdx index 5352683..ee17a89 100644 --- a/docs/docs/admin/installation.mdx +++ b/docs/docs/admin/installation.mdx @@ -55,6 +55,7 @@ Anubis uses these environment variables for configuration: | `POLICY_FNAME` | unset | The file containing [bot policy configuration](./policies.md). See the bot policy documentation for more details. If unset, the default bot policy configuration is used. | | `SERVE_ROBOTS_TXT` | `false` | If set `true`, Anubis will serve a default `robots.txt` file that disallows all known AI scrapers by name and then additionally disallows every scraper. This is useful if facts and circumstances make it difficult to change the underlying service to serve such a `robots.txt` file. | | `TARGET` | `http://localhost:3923` | The URL of the service that Anubis should forward valid requests to. Supports Unix domain sockets, set this to a URI like so: `unix:///path/to/socket.sock`. | +| `USE_REMOTE_ADDRESS` | unset | If set to `true`, Anubis will take the client's IP from the network socket. For production deployments, it is expected that a reverse proxy is used in front of Anubis, which pass the IP using headers, instead. | ### Key generation -- cgit v1.2.3