Skip to content

Feature Request: support nuxt-security csp dynamically #292

Open
@zakarialounes

Description

@zakarialounes

Currently it is only possible to set a csp nonce via theme.cspNonce configuration object (will therefore be static). This should be possible dynamically.

useTheme() via the global property already allows changing the theme, it would be useful to be able to set/change the nonce in the same way. It will probably be necessary to add a vuetify nitro hook in order to allow us to change the csp token before rendering?

For reference:

// change theme 
const vuetifyTheme = useTheme()
const changeTheme = () => {
  vuetifyTheme.global.name.value = getNextThemeName()
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions