Blank dashboard After moving from https to http

Hi guys - I recently moved my self-hosted install over from https to http as I have configured SSL offloading on HAproxy.

I set REQUIRE_HTTPS=false in .env and also set the URL to http.

When I navigate to Invoice Ninja my dashboard is no longer showing Total Revenue etc and the clients and invoices screens are blank.

Checking the modified date of my laravel-error logs shows nothing recent.

Any ideas why this might be happening? - I’ve cleared the browser cache and Invoice Ninja cache.

Many thanks

Seems someone else had a similar issue a while back which explains my setup in HAproxy https://github.com/invoiceninja/invoiceninja/issues/1386

Has anything changed with respect to this issue since this was posted?

Many thanks

I’ve resolved this issue now. For anyone having similar issues with HAProxy using SSL termination with Invoice Ninja, I setup an SSL backend for Invoice Ninja and generated a self-signed certificate (10 year lifetime) for my 443 virtual host in Apache2.

I also disabled certificate SSL checks on the backend to cut down on CPU overhead.

Invoice Ninja now works with a reverse proxy using SSL termination to a SSL backend :slight_smile:

Glad to hear it’s working, thanks for sharing the solution!

I’m late to the party but faced the same problem.
There is an easy solution without the need for a self-signed certificate.

Assuming HAproxy runs on the same machine as invoiceninja:

In haproxy.cfg:

backend invoiceninja-backend
	http-request add-header X-Forwarded-Proto https if { ssl_fc }
	server invoiceninja 127.0.0.1:[port] check

In .env:

APP_URL=https://your.server.com
REQUIRE_HTTPS=true
TRUSTED_PROXIES=127.0.0.1

Thanks for sharing the solution!