forked from Rockachopa/Timmy-time-dashboard
Adds deploy/gitea/app.ini with hardened [service] settings and scripts/harden_gitea.sh to apply them on the server. The script backs up the existing config, patches the four required settings, restarts Gitea, and verifies the changes. Settings applied: - DISABLE_REGISTRATION = true - ALLOW_ONLY_EXTERNAL_REGISTRATION = false - SHOW_REGISTRATION_BUTTON = false - REQUIRE_SIGNIN_VIEW = true Fixes #988 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
771 B
INI
22 lines
771 B
INI
; ── Gitea Hardening — Security Overrides ─────────────────────────────────────
|
|
;
|
|
; Merge these settings into your Gitea custom/conf/app.ini.
|
|
;
|
|
; On a default Gitea install (Docker or bare-metal):
|
|
; /path/to/gitea/custom/conf/app.ini
|
|
;
|
|
; After editing, restart Gitea:
|
|
; systemctl restart gitea # bare-metal
|
|
; docker restart <gitea-container> # Docker
|
|
;
|
|
; See also: scripts/harden_gitea.sh (automated version)
|
|
|
|
[service]
|
|
; Disable public registration — only admins can create accounts
|
|
DISABLE_REGISTRATION = true
|
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
|
|
SHOW_REGISTRATION_BUTTON = false
|
|
|
|
; Require sign-in to view any content (repos, explore, etc.)
|
|
REQUIRE_SIGNIN_VIEW = true
|