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

runtime config usage might break on cloudflare

Open danielroe opened this issue 6 months ago • 1 comments

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...

danielroe avatar Jun 11 '25 06:06 danielroe

Hi @danielroe How would you lazy load on first request?

vejja avatar Jun 11 '25 09:06 vejja