Skip to content

Commit e3dff74

Browse files
authored
Merge pull request #23 from linuxserver/trusted-proxies-readme
2 parents 7d81073 + 60d2e31 commit e3dff74

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ services:
111111
- PGID=1000
112112
- TZ=Etc/UTC
113113
- DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version
114+
- TRUSTED_PROXIES=127.0.0.1/32 #optional
114115
volumes:
115116
- /path/to/kimai/config:/config
116117
ports:
@@ -148,6 +149,7 @@ docker run -d \
148149
-e PGID=1000 \
149150
-e TZ=Etc/UTC \
150151
-e DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version \
152+
-e TRUSTED_PROXIES=127.0.0.1/32 `#optional` \
151153
-p 80:80 \
152154
-p 443:443 \
153155
-v /path/to/kimai/config:/config \
@@ -183,6 +185,7 @@ Containers are configured using parameters passed at runtime (such as those abov
183185
| `-e PGID=1000` | for GroupID - see below for explanation |
184186
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
185187
| `-e DATABASE_URL=mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version` | Configure your database connection, see Application Setup instructions. |
188+
| `-e TRUSTED_PROXIES=127.0.0.1/32` | If behind a reverse proxy set this to its IP or network CIDR so that Kimai trusts its headers. |
186189
| `-v /config` | Persistent config files |
187190

188191
## Environment variables from files (Docker secrets)

readme-vars.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ param_container_name: "{{ project_name }}"
2323
param_usage_include_env: true
2424
param_env_vars:
2525
- {env_var: "DATABASE_URL", env_value: "mysql://your_db_user:your_db_pass@your_db_host:3306/your_db_name?charset=your_db_charset&serverVersion=your_db_version", desc: "Configure your database connection, see Application Setup instructions."}
26+
opt_param_usage_include_env: true
27+
opt_param_env_vars:
28+
- {env_var: "TRUSTED_PROXIES", env_value: "127.0.0.1/32", desc: "If behind a reverse proxy set this to its IP or network CIDR so that Kimai trusts its headers."}
2629
param_usage_include_vols: true
2730
param_volumes:
2831
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Persistent config files"}

0 commit comments

Comments
 (0)