Skip to content

Commit ba8120f

Browse files
committed
Use user agent config in factory
1 parent fd28a73 commit ba8120f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/FeedsFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)