Merged
Conversation
Co-authored-by: Andrew <8158705+maccuaa@users.noreply.github.com>
Co-Authored-By: Justin Tay <49700559+justin-tay@users.noreply.github.com>
|
|
|
I will try to take a close look at this PR later. It is quite easy to mess CSP things up in a way that CSP does little for actual security, so it is preferable that CSP is not messed up in vite |
Member
Author
|
/ecosystem-ci run |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
📝 Ran ecosystem CI on
✅ analogjs, astro, histoire, ladle, laravel, marko, nuxt, previewjs, qwik, rakkas, sveltekit, unocss, vike, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-pages, vite-plugin-react-swc, vite-plugin-svelte, vite-setup-catalogue, vitepress, vitest |
patak-cat
reviewed
Mar 5, 2024
bluwy
reviewed
Mar 12, 2024
Member
bluwy
left a comment
There was a problem hiding this comment.
Awesome! The implementation looks great to me. I guess my only nit is about patak's comment.
patak-cat
reviewed
Mar 13, 2024
patak-cat
approved these changes
Mar 13, 2024
7 tasks
7 tasks
This was referenced Feb 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is updated version of #14653 with changes that was discussed in the team meeting. In that meeting, we discussed that writing nonce placeholder in every script/style/link tag is time consuming. Given that the nonce placeholder should be same even for different HTML files, we decided to make a new option for the nonce placeholder. I made a new PR as it was easier for me than rebasing the old one.
nonceattribute with the value ofhtml.cspNonceoption to<script>/<style>/<link rel="stylesheet">.meta[property=csp-nonce]when injecting style tags that is generated by CSS imports in JS.nonceattribute with the value ofhtml.cspNonceoption to<style>.<script>/<link rel="stylesheet">/<link rel="modulepreload">withnonceattribute with the value ofhtml.cspNonceoption.meta[property=csp-nonce]to injecting link tagsclose #9719
close #11862
superseds close #11864
superseds close #11958
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).