Problem/Motivation
According to fastly there seem to be 2 different ways to perform a url purge
1. Use a POST request
curl -i -X POST "https://api.fastly.com/purge/www.example.com/" \
-H "Fastly-Key: YOUR_FASTLY_TOKEN" \
-H "Accept: application/json"
2. Use a PURGE request
curl -X PURGE -H Fastly-Key:FASTLY_API_TOKEN https://www.example.com/
This module currently uses the first method. We have a customer where we set up Fastly from scratch, where only method 2 works. However we also have another customer, where fastly was setup a longer time ago and both methods work. We compared setups, but we couldn't find any difference that could explain that. We believe that this might have been introduced by fastly's new versionless domains
Steps to reproduce
Proposed resolution
Provide at least the possibility to use either a PURGE or a POST request to purge an url. I have attached a patch which simply replaces the POST request by a PURGE request. This may need to be revised and could, for example, check a config flag to determine whether POST or PATCH should be used, with POST being the default as it was before."
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | fastly-PURGE-instead-of-POST-3580285.patch | 589 bytes | et.cetera |
Comments
Comment #2
et.cetera commented