Re: PgAdmin4 behind SSL proxy - Mailing list pgadmin-support

From Dave Page
Subject Re: PgAdmin4 behind SSL proxy
Date
Msg-id CA+OCxoyxh9JeXoVK8H=LrTTf-7duswQ_4H91SMaJqg8t=xBdnw@mail.gmail.com
Whole thread Raw
In response to RE: PgAdmin4 behind SSL proxy  (Andrew Coleman <penguincoder@gmail.com>)
List pgadmin-support
Hi

On Wed, Jul 10, 2019 at 7:25 PM Andrew Coleman <penguincoder@gmail.com> wrote:

Your example documentation doesn’t include the X-Scheme header, which I think is pretty important when you are proxying to an HTTP backend but using HTTPS terminated at Traefik.


It wasn't needed in my testing. SCRIPT_NAME is the same thing, but passed to the environment of the container running pgAdmin. You do also need a label on the pgAdmin container though to tell Traefik to rewrite the URLs: traefik.frontend.rule=PathPrefix:/pgadmin4
 

 

FWIW, I wasn’t using a path but I was still unable to get it working correctly behind Traefik even with a SCRIPT_NAME=/


I didn't try using SCRIPT_NAME with the app mounted at the root of the vhost, so don't know if that works. The root is the default though, so you should be able to omit it.
 

 

I’ll take another look at it soon and see if I can get it working better with the newer container that has the servers.json change already included.



FWIW, I tested all the configs I documented using the pgAdmin 4.11 container and Traefik 1.7.12 running on the Docker host. I also tested some of the configs with the latest Traefik container, but I found I was getting the same behaviour with that as when running on the host so ended up finishing my work just using it on the host. 

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgadmin-support by date:

Previous
From: Andrew Coleman
Date:
Subject: RE: PgAdmin4 behind SSL proxy
Next
From: Edson Richter
Date:
Subject: Which chart library is being used in PgAdmin 4.x?