mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-21 03:37:56 -05:00
Previous workaround was not working anymore https://github.com/FreshRSS/FreshRSS/issues/1894 https://github.com/FreshRSS/FreshRSS/pull/1924
14 lines
390 B
PHP
14 lines
390 B
PHP
<?php
|
|
|
|
class TumblrGdprExtension extends Minz_Extension {
|
|
public function init() {
|
|
$this->registerHook('simplepie_before_init', array('TumblrGdprExtension', 'curlHook'));
|
|
}
|
|
|
|
public static function curlHook($simplePie, $feed) {
|
|
if (preg_match('#^https?://[a-zA-Z_0-9-]+.tumblr.com/#i', $feed->url())) {
|
|
$simplePie->set_useragent(FRESHRSS_USERAGENT . ' like Baiduspider');
|
|
}
|
|
}
|
|
}
|