File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55require_relative 'roda/roda_plugins/basic_auth'
66
77require 'html2rss'
8- Zeitwerk ::Loader . eager_load_all
9-
108require_relative 'app/ssrf_filter_strategy'
119
1210module Html2rss
@@ -92,10 +90,16 @@ def self.development? = ENV['RACK_ENV'] == 'development'
9290 config = Html2rss ::Configs . find_by_name ( name )
9391
9492 if ( params = request . params ) . any?
93+ config = config . dup
9594 config [ :params ] ||= { }
9695 config [ :params ] . merge! ( params )
9796 end
9897
98+ unless config [ :strategy ]
99+ config = config . dup if config . frozen?
100+ config [ :strategy ] ||= Html2rss ::RequestService . default_strategy_name
101+ end
102+
99103 feed = Html2rss . feed ( config )
100104
101105 HttpCache . expires ( response , feed . channel . ttl . to_i * 60 , cache_control : 'public' )
@@ -109,10 +113,16 @@ def self.development? = ENV['RACK_ENV'] == 'development'
109113 config = LocalConfig . find ( File . basename ( config_name_with_ext , '.*' ) )
110114
111115 if ( params = request . params ) . any?
116+ config = config . dup
112117 config [ :params ] ||= { }
113118 config [ :params ] . merge! ( params )
114119 end
115120
121+ unless config [ :strategy ]
122+ config = config . dup if config . frozen?
123+ config [ :strategy ] ||= Html2rss ::RequestService . default_strategy_name
124+ end
125+
116126 feed = Html2rss . feed ( config )
117127
118128 HttpCache . expires ( response , feed . channel . ttl . to_i * 60 , cache_control : 'public' )
You can’t perform that action at this time.
0 commit comments