Skip to content

Commit

Permalink
Don't output the proxied version if proxy is blank
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Oct 24, 2024
1 parent 3de4414 commit 9a4332b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/secure_headers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
end

# Add proxy configuration for Angular CLI to csp
if FrontendAssetHelper.assets_proxied?
if FrontendAssetHelper.assets_proxied? && FrontendAssetHelper.cli_proxy.present?
proxied = ["ws://#{Setting.host_name}", "http://#{Setting.host_name}",
FrontendAssetHelper.cli_proxy.sub("http", "ws"), FrontendAssetHelper.cli_proxy]
connect_src += proxied
Expand Down

0 comments on commit 9a4332b

Please sign in to comment.