diff options
Diffstat (limited to 'spec/support/helpers/content_security_policy_helpers.rb')
-rw-r--r-- | spec/support/helpers/content_security_policy_helpers.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/helpers/content_security_policy_helpers.rb b/spec/support/helpers/content_security_policy_helpers.rb index 50a1bb62bc5..b12ebcbd4b9 100644 --- a/spec/support/helpers/content_security_policy_helpers.rb +++ b/spec/support/helpers/content_security_policy_helpers.rb @@ -24,8 +24,8 @@ any_time: false) # ``` # find_csp_directive('connect-src') # ``` - def find_csp_directive(key) - csp = response.headers['Content-Security-Policy'] + def find_csp_directive(key, header: nil) + csp = header || response.headers['Content-Security-Policy'] # Transform "default-src foo bar; connect-src foo bar; script-src ..." # into array of values for a single directive based on the given key |