Skip to content

Commit 31eb5b9

Browse files
committed
feat(server): skip sentry span creation for head and options requests
1 parent d17b371 commit 31eb5b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/server/src/middleware/sentry.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export function sentry() {
2222
}
2323

2424
return async (ctx, next) => {
25+
if (ctx.method === "OPTIONS" || ctx.method === "HEAD") {
26+
return next();
27+
}
28+
2529
let traceParentData = {
2630
forceTransaction: true,
2731
};

0 commit comments

Comments
 (0)