Skip to content

Commit 9afc84b

Browse files
authored
fix: notify activity should not be called for the HEAD requests (#7359)
1 parent 9b16f4f commit 9afc84b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/proxy.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,8 @@ const onRequest = async (
859859
}
860860

861861
const maybeNotifyActivity = () => {
862-
if (api && process.env.NETLIFY_DEV_SERVER_ID && (req.method === 'GET' || req.url?.startsWith('/.ntlfy-dev/'))) {
862+
const isInternalRequest = req.url?.startsWith('/.ntlfy-dev/') && req.method !== 'HEAD'
863+
if (api && process.env.NETLIFY_DEV_SERVER_ID && (req.method === 'GET' || isInternalRequest)) {
863864
notifyActivity(api, siteInfo.id, process.env.NETLIFY_DEV_SERVER_ID)
864865
}
865866
}

0 commit comments

Comments
 (0)