kcaldav icon indicating copy to clipboard operation
kcaldav copied to clipboard

httpd with relayd reverse proxy breaks redirects used by kcaldav

Open ghost opened this issue 7 months ago • 0 comments

I'm running a web server on OpenBSD 7.3 using httpd, with relayd as a reverse proxy. httpd listens only on localhost, and relayd relays http connections to it.

I tried setting up kcaldav on this server, but it seems after my client sends auth data to the server, the response contains a location header which includes the port httpd listens on for local connections from relayd, which causes the redirect to fail.

Looking at the code, kcaldav seems to just use the value of the SERVER_PORT fcgi parameter, which is set automatically through httpd and seemingly can't be changed through it. Setting appropriate values for X-Forwarded-* headers through relayd also doesn't seem to have any effect. I'm not sure if I'm doing something wrong, or if this kind of setup is currently unsupported.

It would be nice if I could just assign K_SERVER_PORT (for example) and have kcaldav use its value instead if available.

ghost avatar Nov 24 '23 00:11 ghost