# git.makefuture.ro — Forgejo.
# ---------------------------------------------------------------------------
# Deployed to /opt/web/caddy/etc/conf.d/git.makefuture.caddy on the web box.
# conf.d is shared with makefuture.ro, chat.makefuture.ro, eratic.ro and
# opus.ro, so everything here is scoped to this hostname and defines no
# snippets.
#
# This vhost carries the web UI and git-over-HTTPS. Git over SSH does not pass
# through here at all — it is not HTTP — and reaches the container directly on
# port 2222.
git.makefuture.ro {
reverse_proxy forgejo:3000 {
# A `git push` of a large repository is one long request body, and a
# `git clone` is one long response. Both can outlast a default
# proxy timeout on a slow link and fail halfway with a broken pipe.
transport http {
read_timeout 30m
write_timeout 30m
}
}
# No `request_body` limit set, deliberately: capping it would reject
# exactly the large pushes this forge exists to accept.
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
Referrer-Policy "no-referrer"
Permissions-Policy "geolocation=(), camera=(), microphone=(), payment=(), usb=(), interest-cohort=()"
-Server
-X-Powered-By
}
# No Content-Security-Policy, for the same reason as chat.makefuture.ro:
# Forgejo renders user-authored markdown, embedded images and syntax
# highlighting, and ships its own inline scripts. A policy worth having has
# to be derived from the app's real behaviour and tested against it.
# No compression directive. Git's own transfer is already compressed, and
# re-encoding packfiles on the way out would spend CPU for nothing.
# Consistent with the rest of the box: no request logs. These would record
# every clone and push, with times and addresses.
log {
output discard
}
}