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