Closed W3rff closed 2 months ago
Ah i see this bug is also discussed in https://github.com/Baroshem/nuxt-security/issues/413 , thanks for the quick responses :)
Hi @W3rff Sorry about this, please downgrade to 1.2 while we patch with #414
Released patch 1.3.1 with a fix for that from @vejja.
Please check if it works now :)
Thanks for the quick response, it works now!
Version
nuxt-security: v1.3.0 nuxt: v3.11.1
I am getting a nuxt 500 error since today, and its coming from the file: https://github.com/Baroshem/nuxt-security/blob/main/src/runtime/nitro/plugins/03-subresourceIntegrity.ts , on line 26 . It seems that .decoder() expects a different format than this nuxt app provides.
In my case
sriHashesRaw
is:When i change the code to
sriHashes = sriHashesRaw ?? {};
the bug is gone. So it seems like the format ofsriHashesRaw
is already correct and thenew TextDecoder().decode(sriHashesRaw)
throws the error.This only happens in a production build for me.
I would love to hear how this could be fixed!