feat(forgejo): Configure trusted proxies via ansible vars #357
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "forgejo-trusted-proxies"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This allows forgejo to trust the
X-Forwarded-For
or theX-Real-IP
header from the configured proxies and therefore set the correct remote
ip in logs.
Tbh i don't know how this would interact (or would even be needed) if we would proxy to forgejo via
fcgi
,http+unix
orfcgi+unix
.Currently we only really need this as forgejo defaults to the localhost ip networks for this setting but in our setup forgejo sees the "podman" ip of the caddy container which is not in the localhost network.
For the 2 fcgi options i would assume this to not be necessary but i don't actually know. Maybe these would be alternatives to consider (fcgi would also get around the http/1.1 desync shenanigans)
@ -28,6 +28,10 @@ forgejo_first_admin_email: "forgejo@example.com"
# forgejo_lfs_jwt_secret: ""
# forgejo_oauth2_jwt_secret: ""
# A comma seperated list of ip networks for trusted reverse proxy servers
This is good as is, but because it is not a working default value, we should add a note on what IPs to enter here (caddy network).
Fair point about the note.
However, just to be clear: this default value is the same as forgejo's default value for this setting. If this ansible var does not get changed by anyone running this role this change as a whole does not result in a meaningful config change (the file contents will of course be changed but the resulting config is the same as far as forgejo is concerned)
fixed in
10226bb603
0642e755f2
tob7080ff210
10226bb603
to285192756e