diff --git a/src/utils/purge.js b/src/utils/purge.js index 2ea67a2..26d846c 100644 --- a/src/utils/purge.js +++ b/src/utils/purge.js @@ -9,7 +9,7 @@ const { FASTLY_API_URL } = require('./constants'); * @throws {Error} Throws an error if the request was not successful */ const purgeUnauthenticated = function (url) { - return fetch(url, { method: 'PURGE' }) + return fetch(url.replace(/^(https?:\/\/)?/, 'https://'), { method: 'PURGE' }) .then(res => res.json()) .then(res => { res.url = url;