File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,10 @@ protected function configure()
102102 $ this ->simplePie ->set_cache_duration ($ this ->config ['cache.life ' ]);
103103 }
104104
105+ if (isset ($ this ->config ['user_agent ' ]) && !empty ($ this ->config ['user_agent ' ])) {
106+ $ this ->simplePie ->set_useragent ($ this ->config ['user_agent ' ]);
107+ }
108+
105109 if (isset ($ this ->config ['curl.options ' ]) && is_array ($ this ->config ['curl.options ' ])) {
106110 $ curlOptions += $ this ->config ['curl.options ' ];
107111 }
Original file line number Diff line number Diff line change 102102
103103 'curl.timeout ' => null ,
104104
105+ /*
106+ |--------------------------------------------------------------------------
107+ | Custom User Agent
108+ |--------------------------------------------------------------------------
109+ |
110+ | Some servers block or filter request using user agent rule, this config
111+ | will help to pass it by providing custom user agent string.
112+ | Set to null to use default
113+ |
114+ */
115+ 'user_agent ' => null ,
116+
105117];
You can’t perform that action at this time.
0 commit comments