Skip to content

Commit 9f6d5fa

Browse files
authored
Not reporting OPTIONS (#421)
1 parent 4d28785 commit 9f6d5fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/usage.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ export const withServerUsageReporting = (server: FastifyInstance) => {
8080
return;
8181
}
8282

83-
if (URLS_LIST_TO_NOT_REPORT_USAGE.has(reply.request.routerPath)) {
83+
if (
84+
URLS_LIST_TO_NOT_REPORT_USAGE.has(reply.request.routerPath) ||
85+
reply.request.method === "OPTIONS"
86+
) {
8487
return;
8588
}
8689

0 commit comments

Comments
 (0)