Re: [pgAdmin][RM4768] Reverse proxy on non-standard port

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin][RM4768] Reverse proxy on non-standard port
Date: 2019-10-01 12:27:02
Message-ID: CANxoLDdRv4a523+JrG5j=8Wk3qw538UaxtFCFXWK0UWh7XUYrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, patch applied.

On Tue, Oct 1, 2019 at 4:00 PM Khushboo Vashi <
khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:

>
>
> On Tue, Oct 1, 2019 at 3:58 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>>
>>
>> On Tue, Oct 1, 2019 at 11:27 AM Khushboo Vashi <
>> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>>
>>>
>>>
>>> On Tue, Oct 1, 2019 at 3:55 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Oct 1, 2019 at 11:21 AM Khushboo Vashi <
>>>> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 1, 2019 at 3:16 PM Aditya Toshniwal <
>>>>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>>>>
>>>>>> Hi Hackers,
>>>>>>
>>>>>> Attached is the updated patch.
>>>>>> Changes are made to not to apply ProxyFix if it is not available.
>>>>>> Plus, requirements.txt is updated to Werkzeug>=0.15.0
>>>>>>
>>>>>> It looks good to me except Werkzeug>=0.15.0.
>>>>> Can we make it Werkzeug>0.15.0, this will ensure to upgrade it
>>>>> whenever new version is available.
>>>>>
>>>>
>>>> >= will do that won't it? Removing the = just means we require 0.15.1
>>>> as a minimum instead of 0.15.0.
>>>>
>>>>
>>> >= will do only in the fresh virtual environment, if I am already on
>>> 0.15.0 then it will not upgrade it.
>>> Minimum 0.15.1 will also work, as the current version of Weerkzeug is
>>> 0.16.0
>>>
>>
>> Any reason not to just require that then?
>>
> In case, if we have any problem getting the latest version in RPMs, so
> minimum should be there.
>
>>
>>
>>>
>>> Kindly review.
>>>>>>
>>>>>> On Tue, Oct 1, 2019 at 2:07 PM Murtuza Zabuawala <
>>>>>> murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I forgot to change the virtualenv in another terminal Tab, I am
>>>>>>> getting error
>>>>>>>
>>>>>>> TypeError: __init__() got an unexpected keyword argument ‘x_for’
>>>>>>>
>>>>>>> with Flask 1.0.2.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Murtuza
>>>>>>>
>>>>>>> On Tue, Oct 1, 2019 at 1:35 PM Murtuza Zabuawala <
>>>>>>> murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>>>>>>>
>>>>>>>> Hi Aditya,
>>>>>>>>
>>>>>>>> Tested with below version and works fine.
>>>>>>>>
>>>>>>>> >>> flask.__version__
>>>>>>>> '1.0.2'
>>>>>>>> >>> werkzeug.__version__
>>>>>>>> '0.14.1'
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Regards,
>>>>>>>> Murtuza Zabuawala
>>>>>>>> EnterpriseDB: http://www.enterprisedb.com
>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Oct 1, 2019 at 12:04 PM Aditya Toshniwal <
>>>>>>>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>>>>>>>
>>>>>>>>> Hi Hackers,
>>>>>>>>>
>>>>>>>>> I have added a backward compatible code in cases werkzeug is
>>>>>>>>> older. This will never happen considering we use Flask 1.0.2.
>>>>>>>>> Attached is the precautionary patch.
>>>>>>>>>
>>>>>>>>> On Fri, Sep 27, 2019 at 1:29 PM Akshay Joshi <
>>>>>>>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>>>>>>>
>>>>>>>>>> Thanks, patch applied.
>>>>>>>>>>
>>>>>>>>>> On Fri, Sep 27, 2019 at 12:17 PM Aditya Toshniwal <
>>>>>>>>>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Hackers,
>>>>>>>>>>>
>>>>>>>>>>> Attached is the patch to allow pgAdmin to run behind reverse
>>>>>>>>>>> proxy on a non standard port.
>>>>>>>>>>> The middleware -
>>>>>>>>>>> https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#werkzeug.middleware.proxy_fix.ProxyFix
>>>>>>>>>>> allows us to set the number of trusted ports (and few other params) behind
>>>>>>>>>>> the proxy. By default it is zero.
>>>>>>>>>>> With this patch, user can set these params using pgAdmin config.
>>>>>>>>>>> I have set the default value for port as 1, which will allow to
>>>>>>>>>>> run behind non-standard port.
>>>>>>>>>>>
>>>>>>>>>>> I have added the documentation under reverse proxy section.
>>>>>>>>>>>
>>>>>>>>>>> Kindly review.
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Thanks and Regards,
>>>>>>>>>>> Aditya Toshniwal
>>>>>>>>>>> Sr. Software Engineer | EnterpriseDB India | Pune
>>>>>>>>>>> "Don't Complain about Heat, Plant a TREE"
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> *Thanks & Regards*
>>>>>>>>>> *Akshay Joshi*
>>>>>>>>>>
>>>>>>>>>> *Sr. Software Architect*
>>>>>>>>>> *EnterpriseDB Software India Private Limited*
>>>>>>>>>> *Mobile: +91 976-788-8246*
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Thanks and Regards,
>>>>>>>>> Aditya Toshniwal
>>>>>>>>> Sr. Software Engineer | EnterpriseDB India | Pune
>>>>>>>>> "Don't Complain about Heat, Plant a TREE"
>>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks and Regards,
>>>>>> Aditya Toshniwal
>>>>>> Sr. Software Engineer | EnterpriseDB India | Pune
>>>>>> "Don't Complain about Heat, Plant a TREE"
>>>>>>
>>>>>
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>

--
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Aditya Toshniwal 2019-10-03 07:10:07 Re: [pgAdmin][RM4701] Webpack optimization
Previous Message Akshay Joshi 2019-10-01 12:26:19 pgAdmin 4 commit: Added backward compatible code for reverse proxy in c