Skip to content

Commit

Permalink
Fix spec due to github/secure_headers#506
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Guo committed Oct 17, 2024
1 parent 85fa8e3 commit e60e98d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/support/shared/with_direct_uploads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ def around(example)

csp_config = SecureHeaders::Configuration.instance_variable_get(:@default_config).csp

connect_src = csp_config.connect_src.dup
form_action = csp_config.form_action.dup
connect_src = csp_config[:connect_src].dup
form_action = csp_config[:form_action].dup

begin
csp_config.connect_src << "test-bucket.s3.amazonaws.com"
csp_config.form_action << "test-bucket.s3.amazonaws.com"
csp_config[:connect_src] << "test-bucket.s3.amazonaws.com"
csp_config[:form_action] << "test-bucket.s3.amazonaws.com"

example.run
ensure
csp_config.connect_src = connect_src
csp_config.form_action = form_action
csp_config[:connect_src] = connect_src
csp_config[:form_action] = form_action
end
end

Expand Down

0 comments on commit e60e98d

Please sign in to comment.