diff --git a/roles/docker/templates/gitea-compose.yml.j2 b/roles/docker/templates/gitea-compose.yml.j2 index 6c59838..acde1f9 100644 --- a/roles/docker/templates/gitea-compose.yml.j2 +++ b/roles/docker/templates/gitea-compose.yml.j2 @@ -20,6 +20,15 @@ services: - GITEA__openid__ENABLE_OPENID_SIGNUP=false # v28 deletes Actions runs older than 400 days by default; keep them all - GITEA__actions__RUN_RETENTION_DAYS=0 + # Only Caddy may set X-Forwarded-For (was "*") + - GITEA__security__REVERSE_PROXY_TRUSTED_PROXIES={{ docker.hairpin_ip }}/32 + # Rehashed to argon2 at each user's next password login + - GITEA__security__PASSWORD_HASH_ALGO=argon2 + # New accounts hide their email address + - GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE=true + # No HTTP Basic auth with account passwords. Tokens (PATs, OAuth, + # Actions job tokens) sent via Basic auth still work. + - GITEA__service__ENABLE_BASIC_AUTHENTICATION=false restart: unless-stopped labels: mag37.dockcheck.update: true