Skip to content

Commit

Permalink
Merge pull request #15654 from opf/fix-csop-for-lookbook
Browse files Browse the repository at this point in the history
Fix ContentSecurityPolicy for lookbook
  • Loading branch information
cbliard committed May 23, 2024
2 parents 068a88d + 3798b41 commit d94691e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions config/initializers/lookbook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@
]

# Show pages first, then previews
config.lookbook.preview_inspector.sidebar_panels = [:pages, :previews]
config.lookbook.preview_inspector.sidebar_panels = %i[pages previews]
# Show notes first, all other panels next
config.lookbook.preview_inspector.drawer_panels = [:notes, "*"]
config.lookbook.ui_theme = "blue"

SecureHeaders::Configuration.named_append(:lookbook) do
{
script_src: %w('unsafe-eval' 'unsafe-inline') # rubocop:disable Lint/PercentStringArray
script_src: %w('unsafe-eval' 'unsafe-inline' 'self'), # rubocop:disable Lint/PercentStringArray
script_src_elem: %w('unsafe-eval' 'unsafe-inline' 'self'), # rubocop:disable Lint/PercentStringArray
style_src: %w('self' 'unsafe-inline'), # rubocop:disable Lint/PercentStringArray
style_src_attr: %w('self' 'unsafe-inline') # rubocop:disable Lint/PercentStringArray
}
end

Expand Down

0 comments on commit d94691e

Please sign in to comment.