diff options
| author | Magnus Hagander | 2021-02-24 20:43:53 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2021-02-24 20:43:53 +0000 |
| commit | dc04f41c14bab9e6de1f8368779c4ec579a375ea (patch) | |
| tree | db87d0ec31c903d34102669072e52b3ef166c338 /tools | |
| parent | 8afc748e18b4b9798e986be40c1fdf82b0e09a3f (diff) | |
Make sure Host: header is included in varnish purges
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/varnishqueue/varnish_queue.py | 4 |
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) |
