Re: [Bug] Enpoints have wrong paths when behind proxy

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: Mike Surcouf <mikes(at)surcouf(dot)co(dot)uk>
Cc: Florian Loeffler <florian(dot)loeffler(at)fau(dot)de>, "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: [Bug] Enpoints have wrong paths when behind proxy
Date: 2017-08-18 06:36:31
Message-ID: CAG7mmoxQO4r3Un_Gf96+tR0UYFmDiNMnjtmFRn3VBsiNHWXQ5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Thu, Aug 17, 2017 at 8:38 PM, Mike Surcouf <mikes(at)surcouf(dot)co(dot)uk> wrote:

> Will this be fixed in an updated 1.6 or 1.7
>
It will be in 1.7.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/>

*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

>
>
> Thanks
>
>
>
> Mike
>
>
>
> *From:* Ashesh Vashi [mailto:ashesh(dot)vashi(at)enterprisedb(dot)com]
> *Sent:* 25 July 2017 11:12
> *To:* Florian Loeffler
> *Cc:* pgadmin-support(at)lists(dot)postgresql(dot)org
> *Subject:* Re: [Bug] Enpoints have wrong paths when behind proxy
>
>
>
>
>
> On Tue, Jul 25, 2017 at 3:37 PM, Florian Loeffler <florian(dot)loeffler(at)fau(dot)de>
> wrote:
>
> Hi list,
>
> a bug to report, involving wrong paths generated for some resources when
> pgadmin4 is running behind a proxy and under a another context path than
> "/".
> This leads to a non functional UI.
>
> Version: pgadmin4-1.6-py2.py3-none-any.whl
> OS: Ubuntu 16.04 LTS
> Mode: Desktop
>
> Steps to reproduce:
> - Setup pgadmin4 to be running inside apache2 by following the
> documentation at
> https://www.pgadmin.org/docs/pgadmin4/1.x/server_
> deployment.html#apache-httpd-configuration-linux-unix
> - Change the WSGIScriptAlias line to contain a subcontext, e.g.
> change
> WSGIScriptAlias / /usr/local/lib/python2.7/dist-
> packages/pgadmin4/pgAdmin4.wsgi
> to
> WSGIScriptAlias /pgadmin4 /usr/local/lib/python2.7/dist-
> packages/pgadmin4/pgAdmin4.wsgi
> - access localhost/pgadmin4 on your server
> - multiple resources will not be accessible leading to some lements not
> functioning (eg. the "Add server" button)
>
> Proposed fix:
> - add the current context path to the endpoints generated in
> pgadmin/browser/templates/browser/js/endpoints.js
>
> Unfortunately I have not enough understanding about the code to provide a
> patch.
> For me the fix was to just hardcode the "pgadmin4" path into the code line
> directly.
> That means I have the follwing now:
> '{{ endpoint|safe }}': '/pgadmin4{{ url|safe }}'{% endfor %}
>
> Dave has committed a patch few minutes ago for the same.
>
>
>
>
>
>
>
>
> *commit 178d583bcd7390f3b1e47df6298d924059b21c86 Author: Murtuza Zabuawala
> <murtuza(dot)zabuawala(at)enterprisedb(dot)com <murtuza(dot)zabuawala(at)enterprisedb(dot)com>>
> Date: Tue Jul 25 10:15:18 2017 +0100 Fix paths under non-standard
> virtual directories. Fixes #2563*
>
>
>
>
> * --*
>
>
>
>
> *Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: *Enterprise
> PostgreSQL Company <http://www.enterprisedb.com/>
>
>
>
> *http://www.linkedin.com/in/asheshvashi*
> <http://www.linkedin.com/in/asheshvashi>[image: Image removed by sender.]
>
>
>
> Hope this helps
> Greetings
> Flo
>
> --
> Florian Löffler, Zentrale Systeme
> Regionales Rechenzentrum Erlangen (RRZE)
> Friedrich-Alexander-Universität Erlangen-Nürnberg
> Martensstraße 1, 91058 Erlangen, Germany
> Tel. +49 9131 85-28146
> florian(dot)loeffler(at)fau(dot)de
> www.rrze.fau.de
>
>
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message DEBABRATA MANNA 2017-08-18 07:28:26 Unable to install postgersql in windows 10 hp laptop
Previous Message Florian Loeffler 2017-08-18 06:33:31 Re: [Bug] Enpoints have wrong paths when behind proxy