nuxt-security icon indicating copy to clipboard operation
nuxt-security copied to clipboard

Nuxt security and multer

Open nooooooooooooooon opened this issue 8 months ago • 1 comments

Environment

linux
bun
nuxt

Nuxt Security Version

latest

Default setup used?

No, the bug happens only when I set custom values for the security option

Security options


Reproduction


Description

https://github.com/Baroshem/nuxt-security/blob/471954b08bba3a1a419d6d5c2d3d66130e3b8d51/src/runtime/server/middleware/xssValidator.ts#L22C15-L22C26

Because is used ReadBody and readMultiPartBody I can't use multer, body is already used and I get - Unexpected end of form #1014

Additional context

https://github.com/unjs/h3/issues/1014

Logs


nooooooooooooooon avatar Apr 07 '25 19:04 nooooooooooooooon

Hey there. Yes, I think the issue is in Nuxt Security rather than h3 - I think you can close the other issue and we can continue from here.

The easiest solution that you can use for now is to disable xssValidator with:

xssValidator: false

Until we fix the issue on our side.

Baroshem avatar Apr 08 '25 06:04 Baroshem