Skip to content

Commit 2068ba7

Browse files
committed
clean up some warnings
1 parent 86c762a commit 2068ba7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/secure_headers/configuration.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ def deep_copy_if_hash(value)
126126
# The list of attributes that must respond to a `make_header` method
127127
HEADERABLE_ATTRIBUTES = (CONFIG_ATTRIBUTES - [:cookies]).freeze
128128

129-
attr_accessor(*CONFIG_ATTRIBUTES_TO_HEADER_CLASSES.keys)
129+
attr_writer(*(CONFIG_ATTRIBUTES_TO_HEADER_CLASSES.reject { |key| [:csp, :csp_report_only].include?(key)}.keys))
130+
131+
attr_reader(*(CONFIG_ATTRIBUTES_TO_HEADER_CLASSES.keys))
130132

131133
@script_hashes = nil
132134
@style_hashes = nil

0 commit comments

Comments
 (0)