Redirect /gitea/ to git.DOMAIN instead of proxying Gitea
Gitea's ROOT_URL is now https://git.DOMAIN/, served by the Gitea LXC's own tunnel, so Caddy stops proxying /gitea/ and 301s every /gitea/* URL there with the prefix dropped and the query kept (CV links, HTTPS clones, bookmarks). The admin gate on Gitea's commit-history views goes with the proxy; on git.DOMAIN they are public by choice. The registry at the apex's /v2/ is still proxied. edge_test.sh checks the redirects instead of the gate, and the docs and architecture diagrams follow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+6
-5
@@ -177,7 +177,7 @@
|
||||
}
|
||||
|
||||
# ---- Admin gate (/sb/, /jobs/, /tracker/, /dozzle/, /garage/, /radio/admin/,
|
||||
# Gitea's history views, /uploads/private/) ----
|
||||
# /uploads/private/) ----
|
||||
# forward_auth sends a GET carrying the original request's headers, cookie
|
||||
# included, to the backend's /auth/validate-admin before the request goes
|
||||
# anywhere. 2xx lets it through; 401/403 become a redirect to the SPA login.
|
||||
@@ -231,10 +231,11 @@
|
||||
# Production only (sites/prod.caddy); HSTS on localhost would poison the
|
||||
# browser for every other localhost project on the machine.
|
||||
#
|
||||
# No site-wide CSP here. Gitea (proxied at /gitea/) relies on inline <script>
|
||||
# blocks its own templates generate, so a shared script-src would need
|
||||
# 'unsafe-inline', which voids almost all of CSP's value. If a real CSP
|
||||
# matters again, give the SPA document its own, separate from Gitea.
|
||||
# No site-wide CSP here. It was left out because Gitea, proxied at /gitea/
|
||||
# until 2026-11-24, relies on inline <script> blocks its own templates
|
||||
# generate, so a shared script-src would need 'unsafe-inline', which voids
|
||||
# almost all of CSP's value. Gitea now lives on git.DOMAIN and /gitea/ only
|
||||
# redirects, so that reason is gone; a real CSP for the SPA is now possible.
|
||||
(security_headers) {
|
||||
header {
|
||||
X-Frame-Options "SAMEORIGIN"
|
||||
|
||||
Reference in New Issue
Block a user