invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
420 stars 268 forks source link

Http links requested when visiting a https page #562

Closed kloknibor closed 1 day ago

kloknibor commented 9 months ago

Setup information

docker-compose

Describe the bug image

To reproduce Steps to reproduce the behavior:

  1. Go to client portal
  2. Check console
  3. See error

Expected behavior The client portal to properly load

Screenshots/logs image

No special errors```

**Docker/Kubernetes/Helm**:
- Output of `docker version`:

Docker version 25.0.1, build 29cf629

<!-- Additional info if using helm on k8s, add the info below -->
<!-- Delete this block if not applicable -->
- Output of `helm version`:

(paste your output here)

- Output of `kubectl version`:

(paste your output here)


<!-- End Additional info if using helm on k8s -->

**Additional context**
I am using an Apache reverse proxy which uses SSL to reach the internal Invoice ninja server. So : Public IP --> SSL --> Reverse proxy --> Traffic without SSL --> Invoice ninja install.

I am also using the react interface (and don't know hot to switch back in docker). I woudl expect if I visit a https link all requested links are also https, this is not the case. Enabling require https makes the installation not accesable.
ryangurn commented 9 months ago

What is in your env file?

Do you have APP_URL=http://in.localhost:8003 set like the example? You may need to update this to be https...

chris-cartwright commented 2 months ago

I'm seeing the same issue and have https specified for my protocol in APP_URL.

I have REQUIRE_HTTPS set to false in order to run behind a proxy that handles TLS termination.

image

Edit: Settings > Client Portal > Domain URL is also showing the correct protocol.

chris-cartwright commented 2 months ago

Following the advice in this StackOverflow post worked for me: https://stackoverflow.com/a/65691937.

Can an option be added to call URL::forceScheme('https') within boot? I'm patching the file during build at the moment.