diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-08 00:07:06 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-08 00:07:06 +0300 |
commit | eec1ed522d4103ee7d347c305f1021db33173def (patch) | |
tree | 85100e65d3f3e6323652c1990b3c3b1e21a925fc /spec | |
parent | 4035e1391d65d70228426012618e7c4188c55e18 (diff) | |
parent | d265408c26b6d4a6087df032b1928d142534d0a6 (diff) |
Merge branch 'sh-add-missing-csp-report-uri' into 'master'
Add missing report-uri to CSP config
See merge request gitlab-org/gitlab-ce!31593
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/content_security_policy/config_loader_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/lib/gitlab/content_security_policy/config_loader_spec.rb b/spec/lib/gitlab/content_security_policy/config_loader_spec.rb index e7670c9d523..1d404915617 100644 --- a/spec/lib/gitlab/content_security_policy/config_loader_spec.rb +++ b/spec/lib/gitlab/content_security_policy/config_loader_spec.rb @@ -13,7 +13,8 @@ describe Gitlab::ContentSecurityPolicy::ConfigLoader do child_src: "'self' https://child.example.com", default_src: "'self' https://other.example.com", script_src: "'self' https://script.exammple.com ", - worker_src: "data: https://worker.example.com" + worker_src: "data: https://worker.example.com", + report_uri: "http://example.com" } } end @@ -46,6 +47,7 @@ describe Gitlab::ContentSecurityPolicy::ConfigLoader do expect(policy.directives['default-src']).to eq(expected_config(:default_src)) expect(policy.directives['child-src']).to eq(expected_config(:child_src)) expect(policy.directives['worker-src']).to eq(expected_config(:worker_src)) + expect(policy.directives['report-uri']).to eq(expected_config(:report_uri)) end it 'ignores malformed policy statements' do |