Skip to content

Handle inline styles so we can tighten CSP style directive - #6946

Open
masaball wants to merge 8 commits into
developfrom
inline_styles
Open

Handle inline styles so we can tighten CSP style directive#6946
masaball wants to merge 8 commits into
developfrom
inline_styles

Conversation

@masaball

@masaball masaball commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Related issue: #6929

Most important changes:

  • Switch to css-mini-extract-plugin for (s)css loading. The default style-loader creates inline style elements, while the extract plugin extracts the css into a file that we can then pull in via stylesheet_tag nonce: true.
  • Added some hashes to the style directive. This is because Video.js dynamically creates a handful of style elements. Providing hashes for those elements seems more secure than other options but will potentially have some amount of upkeep associated with it when performing Video.js upgrades. If the hashes end up being inconsistent in future testing, we may be forced to leave style-src on unsafe_inline.

@masaball
masaball marked this pull request as draft August 12, 2026 15:31
@masaball
masaball marked this pull request as ready for review August 12, 2026 18:00
@cjcolvar
cjcolvar requested a review from Dananji August 13, 2026 17:23
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