generated from antfu/starter-ts
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I wanted to compress a large JSON response from /server/api, but useCompression() does not seem to work with beforeResponse hook in Nuxt3. Code as follow:
nitro.hooks.hook('beforeResponse', async (event, response) => {
if (!event.path.startsWith('/api/')) return
await useCompression(event, response)
})According to Nitro doc below, it should work as expected, did I miss something? Thanks!
poke19962008
Metadata
Metadata
Assignees
Labels
No labels