sabre-io / Baikal

Baïkal is a Calendar+Contacts server
https://sabre.io/baikal/
GNU General Public License v3.0
2.42k stars 281 forks source link

Baikal not detecting reverse proxy #1247

Closed cjyar closed 3 months ago

cjyar commented 3 months ago

Baikal version: 0.9.5

Expected behaviour:

As discussed in #1001, I have Baikal running behind an nginx reverse proxy. I expect it to respond to X-Forwarded-Proto and X-Forwarded-Port headers. Even though it's running in an apache2 that listens on http://localhost:8080, it should allow clients to contact it as https://myserver.example.com/.

Current behaviour:

Requests to https://myserver.example.com/.well-known/carddav get redirected to http://myserver.example.com:8080/dav.php.

If I replace the container running baikal with ealen/echo-server, it says request.headers.x-forwarded-proto is https. So I believe all the X-Forwarded headers are being set correctly, but it seems like Baikal isn't respecting them.

Steps to reproduce:

It's a fairly complicated setup. If there's nothing obvious that I'm doing wrong, please let me know and I'll try to distill a simple repro case.

ByteHamster commented 3 months ago

This sounds like you are running Baikal in a container. This repo is only for Baikal, not for any Docker setup. Contact whoever created your docker image instead.