Re: [PATCH] pgarchives: Add host option for pglister_sync - Mailing list pgsql-www

From Magnus Hagander
Subject Re: [PATCH] pgarchives: Add host option for pglister_sync
Date
Msg-id CABUevEyXGiUWBDEB84gs9Nox1Wkqtj9RfwZmMUhjs82NLS2Ktg@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] pgarchives: Add host option for pglister_sync
List pgsql-www
On Thu, Jan 23, 2025 at 3:48 PM Célestin Matte <celestin.matte@cmatte.me> wrote:
This patch makes it possible to define a 'host' parameter in order to override the Host header, to be able to properly query localhost.

Context:
I want to set up HTTP auth for a deployment of pgarchives.
In order for pglister_sync to keep working, I need to either authenticate, or disable authentication for localhost.
When using external URL, the request gets routed to apache using the server's external IP, which makes the 'localhost' whitelist fail.
I prefer using the solution over authenticating, as it ensures queries get directly routed to localhost in the process.

Hi!

What "localhost whitelst" are you referring to here?

As for the patch, it seems like a really bad idea to silently turn off https validation when you specify a hostname. Surely those are completely independent things?

I honestly don't understand your described workload... Is your goal to have http auth on all URLs except the /api/archive/<name>/lists/ endpoint from localhost? Surely that's a matter of apache config rather than patching the client?

And if you just want to change the hostname, can't you just edit the URL?

//Magnus

pgsql-www by date:

Previous
From: Joe Conway
Date:
Subject: Re: Wikipage editor access
Next
From: Jelte Fennema-Nio
Date:
Subject: commitfest app: New process discussion & request for reviews