From f07e9a546ac5fbde07afb01805b70d0fe66a6265 Mon Sep 17 00:00:00 2001 From: David Berlin <47757213+davbree@users.noreply.github.com> Date: Sun, 16 Jun 2024 17:13:30 +0300 Subject: [PATCH] fix: tweak which requests are considered activity (#6710) --- src/utils/proxy.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/proxy.ts b/src/utils/proxy.ts index e5ff3762708..24ea6dc90d2 100644 --- a/src/utils/proxy.ts +++ b/src/utils/proxy.ts @@ -800,10 +800,6 @@ const onRequest = async ( framework: settings.framework, } - if (api && process.env.NETLIFY_DEV_SERVER_ID) { - notifyActivity(api, siteInfo.id, process.env.NETLIFY_DEV_SERVER_ID) - } - if (match) { // We don't want to generate an ETag for 3xx redirects. // @ts-expect-error TS(7031) FIXME: Binding element 'statusCode' implicitly has an 'an... Remove this comment to see the full error message @@ -832,6 +828,10 @@ const onRequest = async ( return proxy.web(req, res, { target: functionsServer }) } + if (req.method === 'GET' && api && process.env.NETLIFY_DEV_SERVER_ID) { + notifyActivity(api, siteInfo.id, process.env.NETLIFY_DEV_SERVER_ID) + } + proxy.web(req, res, options) }