From a0adea70f5484668530eb88236549f1b735296a7 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 9 Oct 2023 22:15:10 +0200 Subject: [PATCH] [mastodon-client] Improve streaming api isMastodon check --- packages/backend/src/server/api/streaming.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/streaming.ts b/packages/backend/src/server/api/streaming.ts index c167c6d63..b7b40ca84 100644 --- a/packages/backend/src/server/api/streaming.ts +++ b/packages/backend/src/server/api/streaming.ts @@ -53,10 +53,7 @@ export const initializeStreamingServer = (server: http.Server) => { const host = `https://${request.host}`; const prepareStream = q.stream?.toString(); - const isMastodon = request.resourceURL.pathname?.endsWith('/api/v1/streaming'); - if (isMastodon && !request.resourceURL.pathname?.startsWith('/mastodon')) { - streamingLogger.warn(`Received connect from mastodon on incorrect path: ${request.resourceURL.pathname}`); - } + const isMastodon = request.resourceURL.pathname?.startsWith('/api/v1/streaming'); const main = isMastodon ? new MastodonStreamingConnection(connection, ev, user, app, q)