Skip to content

Commit 0969d72

Browse files
authored
Pages: Also purge trailing slash (#2565)
Fastly purge requests are sensitive to trailing slash, so to ensure we get the result we want we should also purge that.
1 parent 4aa0d26 commit 0969d72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pages/models.py

+2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ def purge_fastly_cache(sender, instance, **kwargs):
137137
Requires settings.FASTLY_API_KEY being set
138138
"""
139139
purge_url(f'/{instance.path}')
140+
if not instance.path.endswith('/'):
141+
purge_url(f'/{instance.path}/')
140142

141143

142144
def page_image_path(instance, filename):

0 commit comments

Comments
 (0)