diff --git a/README.md b/README.md index 16639cf..1bfbc47 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ import { useCompression } from 'h3-compression' export default defineNitroPlugin((nitro) => { nitro.hooks.hook('render:response', async (response, { event }) => { // Skip internal nuxt routes (e.g. error page) - if (getRequestURL(event).pathname.startsWith('/__nuxt')) + if (getRequestURL(event).pathname.startsWith('/_nuxt')) return if (!response.headers?.['content-type']?.startsWith('text/html')) @@ -87,6 +87,9 @@ export default defineNitroPlugin((nitro) => { > [!NOTE] > `useCompressionStream` doesn't work right now in nitro. So you just can use `useCompression` +> [!WARNING] +> Check this issue https://github.com/CodeDredd/h3-compression/issues/10 before using with **Nuxt 4** + ## Utilities H3-compression has a concept of composable utilities that accept `event` (from `eventHandler((event) => {})`) as their first argument and `response` as their second.