Skip to content

Commit c27fb8c

Browse files
authored
filtering requests without mentioning purge (#39)
1 parent 9a43416 commit c27fb8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async function handleRequest(event) {
2727
let req = event.request;
2828

2929
// Filter requests that have unexpected methods.
30-
if (!["HEAD", "GET", "PURGE"].includes(req.method)) {
30+
if (["POST", "PUT", "PATCH", "DELETE"].includes(req.method)) {
3131
return new Response("This method is not allowed", {
3232
status: 405,
3333
});

0 commit comments

Comments
 (0)