mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-15 02:33:13 +00:00
Set the User-Agent header when purging cache
This commit is contained in:
parent
0731e77c0f
commit
064aaa654b
1 changed files with 3 additions and 0 deletions
|
|
@ -5,6 +5,8 @@ from django.utils.six.moves.urllib.parse import urlparse, urlunparse, urlencode
|
|||
from django.utils.six.moves.urllib.request import Request, urlopen
|
||||
from django.utils.six.moves.urllib.error import URLError, HTTPError
|
||||
|
||||
from wagtail.wagtailcore import __version__
|
||||
|
||||
|
||||
logger = logging.getLogger('wagtail.frontendcache')
|
||||
|
||||
|
|
@ -39,6 +41,7 @@ class HTTPBackend(BaseBackend):
|
|||
]),
|
||||
headers={
|
||||
'Host': host,
|
||||
'User-Agent': 'Wagtail-frontendcache/' + __version__
|
||||
},
|
||||
method='PURGE'
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue