From 2068ba7bb63fb98786db828091cb52304bcae560 Mon Sep 17 00:00:00 2001 From: Neil Matatall Date: Tue, 21 Jan 2020 08:44:43 -1000 Subject: [PATCH] clean up some warnings --- lib/secure_headers/configuration.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/secure_headers/configuration.rb b/lib/secure_headers/configuration.rb index a04a38e..7c71924 100644 --- a/lib/secure_headers/configuration.rb +++ b/lib/secure_headers/configuration.rb @@ -126,7 +126,9 @@ module SecureHeaders # The list of attributes that must respond to a `make_header` method HEADERABLE_ATTRIBUTES = (CONFIG_ATTRIBUTES - [:cookies]).freeze - attr_accessor(*CONFIG_ATTRIBUTES_TO_HEADER_CLASSES.keys) + attr_writer(*(CONFIG_ATTRIBUTES_TO_HEADER_CLASSES.reject { |key| [:csp, :csp_report_only].include?(key)}.keys)) + + attr_reader(*(CONFIG_ATTRIBUTES_TO_HEADER_CLASSES.keys)) @script_hashes = nil @style_hashes = nil