Closed uxweb closed 3 years ago
Hi @uxweb
On Version 2.0.21 you can use the referer
configuration option.
$embera = new Embera([
'referer' => 'https://referrer.com/'
]);
This will set the referer for all http requests.
On the other hand, you could write a new class implementing the Embera\Http\HttpClientInterface
interface and setting the referer for example.
Once you have the class you only need to inject it to the constructor.
$embera = new Embera($config, new DefaultProviderCollection($config), new YourImplementationOfHttpClient());
Let me know if this helps.
Hey @mpratt
Much appreciated for your response. Setting the referer
option when creating a new Embera worked just fine!
Thank you for taking the time to answer my question.
Hello!
I was wondering if it is possible to send custom headers when using the
$embera->getUrlData()
?I'm having an issue with private videos from Vimeo, the endpoint returns a different response for this kind of videos and the thumbnail fields are not included.
According to the Vimeo docs a Referer header must be sent with the whitelisted domain so it can return the private metadata which includes the thumbnail data.
Thank you!