summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMagnus Hagander2021-02-24 20:43:53 +0000
committerMagnus Hagander2021-02-24 20:43:53 +0000
commitdc04f41c14bab9e6de1f8368779c4ec579a375ea (patch)
treedb87d0ec31c903d34102669072e52b3ef166c338 /tools
parent8afc748e18b4b9798e986be40c1fdf82b0e09a3f (diff)
Make sure Host: header is included in varnish purges
Diffstat (limited to 'tools')
-rwxr-xr-xtools/varnishqueue/varnish_queue.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/varnishqueue/varnish_queue.py b/tools/varnishqueue/varnish_queue.py
index fa058799..458337bd 100755
--- a/tools/varnishqueue/varnish_queue.py
+++ b/tools/varnishqueue/varnish_queue.py
@@ -16,8 +16,10 @@ import psycopg2
from setproctitle import setproctitle
-def do_purge(consumername, headers):
+def do_purge(consumername, extraheaders):
try:
+ headers = {'Host': 'www.postgresql.org'}
+ headers.update(extraheaders)
r = requests.get("https://{}.postgresql.org/varnish-purge-url".format(consumername),
headers=headers,
timeout=10)