Skip to content

access useRuntimeConfig() within handlers #595

@danielroe

Description

@danielroe

Environment

latest

Nuxt Security Version

latest

Default setup used?

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

Security options

Reproduction

const securityConfig = useRuntimeConfig().private

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions