We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3ecec4 commit 27973e6Copy full SHA for 27973e6
src/lib/utils/purge.ts
@@ -5,5 +5,7 @@ const purgePath = 'http://varnish'
5
/**Purges the given path from the varnish cache*/
6
export default async function purgeRoute(path: string) {
7
if (path.startsWith('/')) throw new SyntaxError(`path "${path}" cannot be absolute.`)
8
- await fetch(`${purgePath}/${path}`)
+ await fetch(`${purgePath}/${path}`, {
9
+ method: 'PURGE',
10
+ })
11
}
0 commit comments