Send http headers properly

This commit is contained in:
DP-PC\DP 2020-05-14 10:27:48 +02:00
parent 03cf6e94b6
commit a62caeab46
No known key found for this signature in database
GPG Key ID: 1AC9D731945EBBEC
1 changed files with 2 additions and 2 deletions

View File

@ -615,10 +615,10 @@ class Video
$urls = $this->getUrl();
$stream_context_options = [];
if (strpos($this->webpageUrl, 'xhamster.com') !== false) {
if (array_key_exists('Referer', $this->http_headers)) {
$stream_context_options = [
'http' => [
'header' => 'Referer: https://xhamster.com'
'header' => 'Referer: '.$this->http_headers->Referer
]
];
}