summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2021-03-16 00:27:28 +0200
committerGitHub <noreply@github.com>2021-03-16 00:27:28 +0200
commit044cd4d016196e8c7091eee90b7e6f230bba142f (patch)
tree35f060380813f99588966339c5ddf796a8b8c451 /docker
parent6e423d5573c20b78d6e21cb044e8f4d5de5b288a (diff)
downloadgitea-044cd4d016196e8c7091eee90b7e6f230bba142f.tar.gz
gitea-044cd4d016196e8c7091eee90b7e6f230bba142f.zip
Add reverse proxy configuration support for remote IP address (#14959)
* Add reverse proxy configuration support for remote IP address validation * Trust all IP addresses in containerized environments by default * Use single option to specify networks and proxy IP addresses. By default trust all loopback IPs Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'docker')
-rw-r--r--docker/root/etc/templates/app.ini2
-rw-r--r--docker/rootless/etc/templates/app.ini2
2 files changed, 4 insertions, 0 deletions
diff --git a/docker/root/etc/templates/app.ini b/docker/root/etc/templates/app.ini
index c8a8cdc5f3..c5212a9358 100644
--- a/docker/root/etc/templates/app.ini
+++ b/docker/root/etc/templates/app.ini
@@ -53,6 +53,8 @@ ROOT_PATH = /data/gitea/log
[security]
INSTALL_LOCK = $INSTALL_LOCK
SECRET_KEY = $SECRET_KEY
+REVERSE_PROXY_LIMIT = 1
+REVERSE_PROXY_TRUSTED_PROXIES = *
[service]
DISABLE_REGISTRATION = $DISABLE_REGISTRATION
diff --git a/docker/rootless/etc/templates/app.ini b/docker/rootless/etc/templates/app.ini
index 92755575b9..905b2adb33 100644
--- a/docker/rootless/etc/templates/app.ini
+++ b/docker/rootless/etc/templates/app.ini
@@ -49,6 +49,8 @@ ROOT_PATH = $GITEA_WORK_DIR/data/log
[security]
INSTALL_LOCK = $INSTALL_LOCK
SECRET_KEY = $SECRET_KEY
+REVERSE_PROXY_LIMIT = 1
+REVERSE_PROXY_TRUSTED_PROXIES = *
[service]
DISABLE_REGISTRATION = $DISABLE_REGISTRATION