Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

access useRuntimeConfig() within handlers #595

Open
danielroe opened this issue Jan 13, 2025 · 0 comments · May be fixed by #599
Open

access useRuntimeConfig() within handlers #595

danielroe opened this issue Jan 13, 2025 · 0 comments · May be fixed by #599
Labels
bug Something isn't working

Comments

@danielroe
Copy link
Contributor

Environment

latest

Nuxt Security Version

latest

Default setup used?

Yes, the bug happens even if the security option is not customized

Security options

Reproduction

https://github.com/Baroshem/nuxt-security/blob/47d38b32e8b99e33081c4c66d0f35687b9c40457/src/runtime/server/middleware/basicAuth.ts#L19

Description

useRuntimeConfig(event) should be called within an event handler function, as this is required for CF support, and also can trigger rollup bundling issues if called outside it (see nuxt/nuxt#30511)

Additional context

No response

Logs

@danielroe danielroe added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant