-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Adapt config file to conform to Wt trusted proxy changes #532
Comments
Hello, |
I just tested, it looks like it works fine even with the current deprecated option? Do you correctly forward the relevant headers in your reverse proxy config?
Note this is used for example for the message: |
I typed out a big message showing my reverse proxy setup and what the logs look like before realising that the docs in
So yeah. I'm accessing from a local address, of course it's not logging it. I still believe the config should be replaced, and I see you've added a commit that does that. Thanks :) old message
I have set up Caddy manually to include Caddyfile
The upstream request from includes the Caddy upstream request log
So assuming that the header is truly incorrectly capitalised, and that Wt looks at BOTH the And here's what LMS's log looks like:
|
I was wondering why despite setting
behind-reverse-proxy
totrue
, I had never seen a real Client IP in LMS's logs. I thought I had configured it wrong, but after checking the very top of the LMS logs, I saw that thebehind-reverse-proxy
config is actually deprecated:[warning] "config: The behind-reverse-proxy configuration option is deprecated, use a <trusted-proxy-config> block instead"
Turns out, even though the deprecation warning has been showing in issues here for at least two years now, nobody noticed the four year old upstream commit changing client IP detection behaviour.
The new configuration uses a
trusted-proxy-config
defined in thewt_config.xml
file. The default looks like this:There are no proxies trusted by default, and seemingly only one original header can be defined.
Inside the
<trusted-proxies>
element, is a<proxy>
element that contains the network in CIDR notation to be considered trustworthy, e.g:Because the
wt_config.xml
file is generated programmatically, users cannot add this new configuration to the file themselves; it is overwritten on startup (nor can they pass--config=
to LMS like the logs suggest).The LMS config should have the deprecated
behind-reverse-proxy
key removed, and should be adapted to write the newtrusted-proxy-config
values.The text was updated successfully, but these errors were encountered: