Reverse Proxy to https with local ACME certificate

@francislavoie I also think its more clean to leave the backend setup alone and take care of in in the frontend so I tried to get some more info about X-Forwarded-Host but in the Caddy documentation there is not a lot. I never heard of it before and I understand it’s a (experimental) protocol thing? Nothing specific for Caddy.

Looking at the Nextcloud documentation I found that they support it. But I be fair, I don’t understand much of it.

A reverse proxy can define HTTP headers with the original client IP address, and Nextcloud can use those headers to retrieve that IP address. Nextcloud uses the de-facto standard header ‘X-Forwarded-For’ by default, but this can be configured with the forwarded_for_headers parameter. This parameter is an array of PHP lookup strings, for example ‘X-Forwarded-For’ becomes ‘HTTP_X_FORWARDED_FOR’. Incorrectly setting this parameter may allow clients to spoof their IP address as visible to Nextcloud, even when going through the trusted proxy! The correct value for this parameter is dependent on your proxy software.

https://docs.nextcloud.com/server/20/admin_manual/configuration_server/reverse_proxy_configuration.html

Before drowning in another thing, are you able to give a pointer to use X-Forwarded-Host, based on the above info?

Thanks,
Robbert