Skip to content

Commit 6c522e3

Browse files
authored
fix(analytics): fix filter to check body.method (#1250)
1 parent 6548e10 commit 6c522e3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/sdk-socket-server-next/src/analytics-api.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,7 @@ app.post('/evt', evtMetricsMiddleware, async (_req, res) => {
288288

289289
// Filter: drop RPC events with unallowed methods silently, let all else through
290290
if (toCheckEvents.includes(body.event) &&
291-
(!body.params ||
292-
!body.params.method ||
293-
!allowedMethods.includes(body.params.method))) {
291+
(!body.method || !allowedMethods.includes(body.method))) {
294292
return res.json({ success: true });
295293
}
296294

0 commit comments

Comments
 (0)