Skip to content

Commit

Permalink
fix: tweak which requests are considered activity (#6710)
Browse files Browse the repository at this point in the history
  • Loading branch information
davbree authored Jun 16, 2024
1 parent 1706c8c commit f07e9a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}

Expand Down

2 comments on commit f07e9a5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,317
  • Package size: 480 MB
  • Number of ts-expect-error directives: 978

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,317
  • Package size: 480 MB
  • Number of ts-expect-error directives: 978

Please sign in to comment.