[ZeitBridge] Re-add paywall workaround (#3352)

Additionally to the Googlebot User-Agent, a Googlebot IP address has to
be used. For now, we can use `X-Forwarded-For` for this.
This commit is contained in:
Paul Prechtel 2023-04-18 18:41:40 +02:00 committed by GitHub
parent 7c4591c550
commit 4068668de9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,6 +66,8 @@ class ZeitBridge extends FeedExpander
$item['enclosures'] = []; $item['enclosures'] = [];
$headers = [ $headers = [
'User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
'X-Forwarded-For: 66.249.66.1',
'Cookie: zonconsent=' . date('Y-m-d\TH:i:s.v\Z'), 'Cookie: zonconsent=' . date('Y-m-d\TH:i:s.v\Z'),
]; ];