aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2024-04-07 14:44:03 -0400
committerShav Kinderlehrer <[email protected]>2024-04-07 14:44:03 -0400
commit1075ab0ed187a10f2eb3faf1247da8661531bbdb (patch)
treef600db86af21a63da67114a30c9825fd0ea75971 /README.md
parenta29d68aed7a1fbfbeb3d60df55f28fdee9fb9ca1 (diff)
downloadchela-1075ab0ed187a10f2eb3faf1247da8661531bbdb.tar.gz
chela-1075ab0ed187a10f2eb3faf1247da8661531bbdb.zip
Add proxy support
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/README.md b/README.md
index 48afbad..2f24b88 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ You can create a redirect by navigating to the `/create` page and filling out th
### With Docker
#### CLI
```bash
-docker run -d \
+$ docker run -d \
-p 3000:3000 \
-e DATABASE_URL=postgres://chela:password@dbhost/postgres?sslmode=disable \
-e CHELA_HOST=a.com \
@@ -37,6 +37,7 @@ services:
- DATABASE_URL=postgres://chela:password@chela-postgres/postgres?sslmode=disable
- CHELA_HOST=a.com
- CHELA_MAIN_PAGE_REDIRECT='https://example.com'
+ - CHELA_BEHIND_PROXY=1
depends_on:
- chela-postgres
restart: unless-stopped
@@ -59,6 +60,9 @@ The address that Chela should listen on. Defaults to `0.0.0.0`.
##### `CHELA_MAIN_PAGE_REDIRECT`
A page that Chela will redirect to when `/` is requested instead of replying with the default homepage.
+##### `CHELA_BEHIND_PROXY`
+If this variable is set, Chela will use the `X-Real-IP` header as the client IP address rather than the connection address.
+
### Manually
#### Build
```bash
@@ -86,6 +90,7 @@ server {
location / {
proxy_pass http://localhost:3000/;
+ proxy_set_header X-Real-IP $remote_addr;
limit_except GET HEAD {
auth_basic 'Restricted';