From 01d857b09ae22174d5101a03b424829a876cc4bd Mon Sep 17 00:00:00 2001 From: Stephen Solis Date: Thu, 12 Apr 2018 12:12:09 -0400 Subject: Add WebSocket URI support to CSP DSL mappings --- actionpack/test/dispatch/content_security_policy_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test/dispatch/content_security_policy_test.rb') diff --git a/actionpack/test/dispatch/content_security_policy_test.rb b/actionpack/test/dispatch/content_security_policy_test.rb index f133aae865..95fce39dad 100644 --- a/actionpack/test/dispatch/content_security_policy_test.rb +++ b/actionpack/test/dispatch/content_security_policy_test.rb @@ -51,6 +51,12 @@ class ContentSecurityPolicyTest < ActiveSupport::TestCase @policy.script_src :strict_dynamic assert_equal "script-src 'strict-dynamic'", @policy.build + @policy.script_src :ws + assert_equal "script-src ws:", @policy.build + + @policy.script_src :wss + assert_equal "script-src wss:", @policy.build + @policy.script_src :none, :report_sample assert_equal "script-src 'none' 'report-sample'", @policy.build end -- cgit v1.2.3