Skip to content

A free, self-hostable news aggregator…

Remove HTTP Referer for HTML download (#4372)

Alexandre Alapetitecbf2bc085aee
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 96a9cb2a8..5a608d3fd 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -405,12 +405,10 @@ function getHtml(string $url, array $attributes = []): string {
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
- CURLOPT_REFERER => SimplePie_Misc::url_remove_credentials($url),
CURLOPT_HTTPHEADER => array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'),
CURLOPT_USERAGENT => FRESHRSS_USERAGENT,
CURLOPT_CONNECTTIMEOUT => $feed_timeout > 0 ? $feed_timeout : $limits['timeout'],
CURLOPT_TIMEOUT => $feed_timeout > 0 ? $feed_timeout : $limits['timeout'],
- //CURLOPT_FAILONERROR => true;
CURLOPT_MAXREDIRS => 4,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,