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

Content Security Policy Support #98

Merged
merged 1 commit into from
Apr 13, 2023
Merged

Content Security Policy Support #98

merged 1 commit into from
Apr 13, 2023

Conversation

rawilk
Copy link
Owner

@rawilk rawilk commented Apr 13, 2023

When implementing a Content Security Policy, a common way to allow script files is to use a nonce. This will allow you to specify a nonce to be rendered onto the package scripts by one of the following ways:

  • Send it through as an option via the @fcScripts blade directive (The <fc:scripts /> custom tag does not support this)
@fcScripts(['nonce' => 'my-nonce'])
Vite::useCspNonce();

@rawilk rawilk merged commit 83595c6 into main Apr 13, 2023
@rawilk rawilk deleted the csp branch April 13, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant