nuxt-security
nuxt-security copied to clipboard
runtime config usage might break on cloudflare
Reproduction
https://github.com/Baroshem/nuxt-security/blob/main/src/runtime/nitro/plugins/00-routeRules.ts#L11
Description
spotted this while debugging another issue and wanted to let you know that you should pass event to useRuntimeConfig in the nitro context. this is particularly important on platforms like cloudflare.
given that you are using this in a nitro plugin, you might need to load nuxt security lazily (e.g. on first request) rather than on the cold start of the nitro server...
Hi @danielroe How would you lazy load on first request?