Skip to content

Support for strict CSP on static pages #78

@prichey

Description

@prichey

First of all, thanks for the library - I have enjoyed using it on a variety of pages and find it works very well for my purposes.

I have ran into an issue in using it on static pages, though, due to a strict CSP which prevents unsafe-eval. I am aware of the nonce prop which was introduced in #61 - this works well for SSR pages, but as I understand it does not work for static pages, because a nonce should differ per request.

What is the recommended solution in this situation? I understand a hash is difficult to implement since the injected scripts will vary in number and content. Would it be possible to introduce a prop that disables injecting the script on static pages, such that the balancer only runs at build time?

I'm happy to help collaborate on a solution for this if there's agreement about the correct solution. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions