-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help debug trusted_proxies with more verbose output #35810
Comments
Did you mean trusted_domains? |
Sry, trusted_proxies. |
I am seeing this same message: The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. And I don't like it. It's not clear enough and the bold bit is concerning. I am indeed accessing Nextcloud form a trusted proxy. As best I understand it because my server is running behind a NAT firewall and a reverse proxy forwards requests to the Nextcloud server (and any number of other web services here too) I followed this: and configured my system appropriately.
Because the first is the gateway running a reverse proxy and the second is just a desktop on the LAN that I test from. Basically, if I have elected to run from behind a trusted proxy this is a configured a fine situation and I don't want to see a concerning amber warning. Looking into it here's the code that runs:
and returns false to trigger the warning. From which I must conclude, given I have set trusted_proxies to be an array, that: I'd love to know if I'm reading the logic right here, and why I'm getting a False back for a properly configured reverse proxy. |
The URL isn't relevant for
We should perhaps consider making the warning more specific, alluding to which of the above scenarios we detected I guess.
Remove the desktop on the LAN that you test from if it's just a client device. It shouldn't be in your
That's fine. Nothing strange about that. Now if your proxy happens to be outside your NAT and if you happen to have a bunch of users (or just devices) accessing your Nextcloud from behind the same single NAT IP address (from your proxy's perspective) it's possible you might trigger some rate limiters (or brute force protection if any of those devices/users have invalid or expired passwords). But that's addressable by either: a) Best: Using Split horizon DNS so that your internal LAN users don't leave your network and bypass any external proxy
The entire point of configuring |
Thanks muchly. Will investigate. My timeline may be this week if I can squeeze it in or early December ... so bookmarking this. |
And kudos, removing my desktop PC's IP address from trusted proxies, restarting php, and then reloading the overview page and the error message was gone. Alas, I cannot update.And I suspect it's failing because of this message on the overview: Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the documentation ↗. (List of invalid files… / Rescan…) which is a direct consequence of this: I may try unpatching that to try an update. But it may not be the reason as: |
Skip that. Turns out I just had to chown the whole web tree and the updated worked. I suspect my edit to the config file in fact left the permissions on it awry. One of those sudo risks. |
Is your feature request related to a problem? Please describe.
I lost a lot of time trying to debug trusted_proxies. Help debug trusted_proxies with more verbose output.
Describe the solution you'd like
I belive this comes from the function 'forwardedForHeadersWorking' which is in './apps/settings/lib/Controller/CheckSetupController.php' file, starting in line 351.
I'm thinking if the output could be a little bit more clear, showing the wrong url. Prepending the upper message with something like 'URL 'https://example.com' is not in the trusted_proxies hosts.'
The text was updated successfully, but these errors were encountered: