mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
Let web vitals route handle all requests under that path (#11120)
This commit is contained in:
parent
9566fa0860
commit
9a0e94b2e6
2 changed files with 6 additions and 1 deletions
5
.changeset/three-bikes-stare.md
Normal file
5
.changeset/three-bikes-stare.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@astrojs/web-vitals": patch
|
||||
---
|
||||
|
||||
Fixes requests to the web vitals endpoint in setups like Vercel’s `trailingSlash: true` that redirect from `/web-vitals` to `/web-vitals/`
|
|
@ -32,7 +32,7 @@ export default function webVitals({ deprecated }: { deprecated?: boolean } = {})
|
|||
// Endpoint that collects metrics and inserts them in Astro DB.
|
||||
injectRoute({
|
||||
entrypoint: '@astrojs/web-vitals/endpoint',
|
||||
pattern: WEB_VITALS_ENDPOINT_PATH,
|
||||
pattern: WEB_VITALS_ENDPOINT_PATH + '/[...any]',
|
||||
prerender: false,
|
||||
});
|
||||
// Client-side performance measurement script.
|
||||
|
|
Loading…
Add table
Reference in a new issue