summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Config/FetcherConfig.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Config/FetcherConfig.php b/lib/Config/FetcherConfig.php
index 7631485f5..866f9a4f1 100644
--- a/lib/Config/FetcherConfig.php
+++ b/lib/Config/FetcherConfig.php
@@ -58,6 +58,14 @@ class FetcherConfig
const DEFAULT_USER_AGENT = 'NextCloud-News/1.0';
/**
+ * Acccept header for the client.
+ * @var string
+ */
+ const DEFAULT_ACCEPT = 'application/rss+xml, application/rdf+xml;q=0.8, ' .
+ 'application/atom+xml;q=0.6, application/xml;q=0.4, ' .
+ 'text/xml;q=0.4, */*;q=0.2';
+
+ /**
* Configure a guzzle client
*
* @return ClientInterface Legacy client to guzzle.
@@ -78,7 +86,7 @@ class FetcherConfig
{
$config = [
'timeout' => $this->client_timeout,
- 'headers' => ['User-Agent' => static::DEFAULT_USER_AGENT],
+ 'headers' => ['User-Agent' => static::DEFAULT_USER_AGENT, 'Accept' => static::DEFAULT_ACCEPT],
];
if (!empty($this->proxy)) {