OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix lookbook accessing behind proxy
Oliver Günther851790db8076
diff --git a/config/initializers/lookbook.rb b/config/initializers/lookbook.rbindex 4530a141d58..eb74d34c9aa 100644--- a/config/initializers/lookbook.rb+++ b/config/initializers/lookbook.rb@@ -24,11 +24,19 @@ Rails.application.configure doconfig.lookbook.ui_theme = "blue"SecureHeaders::Configuration.named_append(:lookbook) do+ proxied =+ if FrontendAssetHelper.assets_proxied?+ ["ws://#{Setting.host_name}", "http://#{Setting.host_name}",+ FrontendAssetHelper.cli_proxy.sub("http", "ws"), FrontendAssetHelper.cli_proxy]+ else+ []+ end+{- 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+ script_src: proxied + %w('unsafe-eval' 'unsafe-inline' 'self'), # rubocop:disable Lint/PercentStringArray+ script_src_elem: proxied + %w('unsafe-eval' 'unsafe-inline' 'self'), # rubocop:disable Lint/PercentStringArray+ style_src: proxied + %w('self' 'unsafe-inline'), # rubocop:disable Lint/PercentStringArray+ style_src_attr: proxied + %w('self' 'unsafe-inline') # rubocop:disable Lint/PercentStringArray}end