Connecting to localhost:9000 directly works just fine. Weechat’s relay on port 9000 is configured to not use TLS.
It works with a self-signed certificate and with glowing-bear connecting to weechat directly.
The problem must be with my caddy setup… Can anybody help?
So you’re getting back an unexpected 400 response code? Sounds like Caddy or your web client is making a bad request to the backend… but what that means for the backend is hard to say for sure. Have you been able to tweak or reduce the problem down more to eliminate some of the complexity and maybe identify where that code is coming in?
Hi, I’m facing this same issue and I think it has to do with one of the headers Caddy is adding when it proxys the request. When I get the raw requests from WeeChat this is what I see with Caddy:
I have also tried to isolate the issue by preventing caddy from sending the extra headers (Accept-Encoding, User-Agent & X-Forwarded-For) to the backend but either it is not possible to remove these headers or I am doing something wrong. The config I used for that was:
I’d be interested in the outcome of this, too - I tried Weechat/Glowing Bear a while back but ran into issues (I didn’t document them at the time unfortunately), I eventually gave up on them and am using Lounge & ZNC instead, which I’m not 100% happy with so far.
[quote=“matt, post:4, topic:801”]
If you think this is a bug in Caddy, could you please open an issue on GitHub so we don’t forget about it?
Thanks.[/quote]
Well I’m not sure if those headers should be possible to be removed? If you think they should be removable then I will create an issue.
I had a read of the source code & it doesn’t seem as though Caddy is adding them so if I’m right about that then they must be added by the go networking library.
Open an issue on Github anyway, because either the header stripping is not working properly, or the documentation is incomplete and should also include a list of headers that can’t be stripped.
Just wanted to add a link here to the issue. Summary of the outcome being that Caddy is behaving correctly and it was a bug in WeeChat which will be fixed in their next release.