Skip to content

Update documentation of TRUSTED_PROXY syntax and document limitations. - #9283

Merged
Alkarex merged 2 commits into
FreshRSS:edgefrom
yuchenshi:trusted-proxy-docs
Sep 28, 2026
Merged

Alkarex merged 2 commits into
FreshRSS:edgefrom
yuchenshi:trusted-proxy-docs

Conversation

@yuchenshi

@yuchenshi yuchenshi commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #9210

Changes proposed in this pull request:

  • Updated documentation on TRUSTED_PROXY syntax.
  • No code or behavior changes.

How to test the feature manually:

For IPs without /, I manually tested the behavior and found requests got rejected on my server before #9301. After #9301 is merged, I've tested again and found that requests are now authorized as expected. So I've updated the corresponding documentation to say "IPs or ranges" where applicable.

Domain names are still silently ignored as of writing. I looked at the code, as described in #9210 investigation steps, and concluded that they are WAI (working as implemented , not sure if intended ). I don't particularly like the existing behavior (failures with no debuggable warnings or logs) but I try to document it as-is without judgement.

Pull request checklist:

  • clear commit messages
  • code manually tested
  • unit tests written (optional if too hard) -- did not write for docs
  • documentation updated

Additional information can be found in the documentation.

@Alkarex Alkarex added this to the 1.30.1 milestone Sep 10, 2026
Comment thread docs/en/admins/09_AccessControl.md Outdated

You may alternatively pass a `TRUSTED_PROXY` environment variable in a format compatible with [Apache’s `mod_remoteip` `RemoteIPInternalProxy`](https://httpd.apache.org/docs/current/mod/mod_remoteip.html#remoteipinternalproxy).
You may alternatively pass a `TRUSTED_PROXY` environment variable, which is a space-separated list of CIDR notations like this: `192.168.1.10/32 ::1/128`.
Unlike [Apache’s `mod_remoteip` `RemoteIPInternalProxy`](https://httpd.apache.org/docs/current/mod/mod_remoteip.html#remoteipinternalproxy) syntax, domain names or a single IP missing a `/32` or `/128` suffix is not supported and will silently cause requests to be rejected as unauthorized.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be worth checking if we could easily support the missing part of the syntax

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in another thread, #9301 adds single IPs, which is relatively straightforward. I've adjusted the PR accordingly since it is now merged.

Supporting domain names is a bit more involved, see #9289, which is not yet merged. So I've just documented the existing limitation assuming we're not merging #9289 any time soon.

Single IPs are now supported as of FreshRSS#9301.
Document the existing limitation of domain names, see FreshRSS#9210.
Single IPs are now supported as of FreshRSS#9301.
Document the existing limitation of domain names, see FreshRSS#9210.
@yuchenshi
yuchenshi requested a review from Alkarex September 28, 2026 04:07
@yuchenshi yuchenshi changed the title Fix documentation of TRUSTED_PROXY syntax and document limitations. Update documentation of TRUSTED_PROXY syntax and document limitations. Sep 28, 2026
@Alkarex
Alkarex merged commit 818b57a into FreshRSS:edge Sep 28, 2026
3 checks passed
@Alkarex

Alkarex commented Sep 28, 2026

Copy link
Copy Markdown
Member

Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] IPs without /subnet and domain names in TRUSTED_PROXY are ignored for REMOTE_USER purposes

2 participants