File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ class ContentSecurityPolicy
1313 FALLBACK_VERSION = ::UserAgent ::Version . new ( "0" )
1414
1515 def initialize ( config = nil , user_agent = OTHER )
16+ user_agent ||= OTHER
1617 @config = if config . is_a? ( Hash )
1718 if config [ :report_only ]
1819 ContentSecurityPolicyReportOnlyConfig . new ( config || DEFAULT_CONFIG )
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ module ClassMethods
200200 #
201201 # Returns a default policy if no configuration is provided, or a
202202 # header name and value based on the config.
203- def make_header ( config , user_agent )
203+ def make_header ( config , user_agent = nil )
204204 return if config . nil? || config == OPT_OUT
205205 header = new ( config , user_agent )
206206 [ header . name , header . value ]
You can’t perform that action at this time.
0 commit comments