You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The settings in the plugin/headers.ts file should be applied
What is actually happening?
They are not applied.
How to solve?
Digging a bit deeper into the output of nuxt it seems like the setHeader (not setHeaders) method is not being created in the output of a nuxt build: .output/server/chunks/nitro/node-server.mjs file
It seems to originate from the ./src/runtime/nitro/plugins/00-context.ts file in nuxt-security.
The issue is fixed by adding "setHeader" as an explicit import from "#imports"
The text was updated successfully, but these errors were encountered:
Version
nuxt-security: 1.1.1
nuxt: 3.10.1
Reproduction Link
https://stackblitz.com/edit/nuxt-starter-urmubt
Steps to reproduce
Set the runtimeHooks like described in the docs
What is Expected?
The settings in the plugin/headers.ts file should be applied
What is actually happening?
They are not applied.
How to solve?
Digging a bit deeper into the output of nuxt it seems like the setHeader (not setHeaders) method is not being created in the output of a nuxt build:
.output/server/chunks/nitro/node-server.mjs file
It seems to originate from the
./src/runtime/nitro/plugins/00-context.ts
file in nuxt-security.The issue is fixed by adding "setHeader" as an explicit import from "#imports"
The text was updated successfully, but these errors were encountered: