Skip to content

Commit

Permalink
Fix wrong PURGE URL wow-actions#1
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic authored Jan 22, 2024
1 parent a6ca78d commit 52a5eb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ async function purge(url: string) {
const img = images[i]
const cacheURL = img.attribs.src
const rawURL = img.attribs['data-canonical-src']
if (!rawURL) {
continue;
}
// eslint-disable-next-line no-await-in-loop
const res = await fetch(cacheURL, { method: 'PURGE' })
if (res.ok) {
Expand Down

0 comments on commit 52a5eb3

Please sign in to comment.