I am running invoiceninja using docker and am using this container as a reverse proxy: https://github.com/jwilder/nginx-proxy and it works well but as soon as I start redirecting all HTTP to HTTPS invoiceninja starts looking funny as in mixed content doesn’t get displayed.
I found this thread here https://www.invoiceninja.com/forums/topic/unable-to-secure-site-with-ssl-with-pound-reverse-proxy-server/ which seems to deal with the exact same problem I am having but the solution doesn’t seem to work for me.
In my dockerfile to build invoiceninja I set the trustedproxy both for my external and for my internal range docker is using:
environment: VIRTUAL_HOST: in.domain.tld LETSENCRYPT_HOST: in.domain.tld LETSENCRYPT_EMAIL: firstname.lastname@example.org TRUSTED_PROXIES: '51.xxx.xxx.xxx,172.17.0.0/24'
I have not set these as invoiceninja isn’t supposed to run on https as the proxy connects to it via http but serves https to visitors
REQUIRE_HTTPS=true SESSION_ENCRYPT=true SESSION_SECURE=true
I have also set this header in my proxy:
proxy_set_header X-Forwarded-Proto https;
it used to be:
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
Any more pointers?