-
-
Notifications
You must be signed in to change notification settings - Fork 666
fix(cdn): use purge by key endpoint #2931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,5 +24,6 @@ jobs: | |
| - name: Purge ${{ env.KEY }} | ||
| run: | | ||
| curl -fsS -X POST \ | ||
| "https://api.fastly.com/service/${{ secrets.FASTLY_SERVICE_ID }}/purge/${{ env.KEY }}" \ | ||
| -H "Fastly-Key: ${{ secrets.FASTLY_API_KEY }}" | ||
| "https://api.fastly.com/service/${{ secrets.FASTLY_SERVICE_ID }}/purge" \ | ||
| -H "Fastly-Key: ${{ secrets.FASTLY_API_KEY }}" \ | ||
| -H "Surrogate-Key: ${{ env.KEY }}" | ||
|
Comment on lines
+27
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The workflow now posts to Useful? React with 👍 / 👎. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow now POSTs to
/service/${FASTLY_SERVICE_ID}/purgewith aSurrogate-Keyrequest header and no body. Elsewhere in this repo, surrogate-key purging is implemented as a POST to/service/{service_id}/purge/{key}(seefastly/utils.py:44-48), so this change likely breaks purging (or at least makes it inconsistent with the app’s purge behavior). Recommend switching back to the/purge/${KEY}endpoint, or if you intend to use the multi-key purge endpoint, send the expected JSON payload and required headers (e.g., content-type) instead of onlySurrogate-Key.