Support » Plugin: YouTube Channel » Http referrer problem

  • Hi,

    for me plugin wasn’t working after in google console I added youtube API key restriction HTTP referrers: my website’s url. It showed that referrer is wrong, debugging showed that referrer was the same generated url as $feed_url in fetch_youtube_feed() function. That’s how wp_remote_get() works I suppose.
    After I modified fetch_youtube_feed() by adding referer to wp_remote_get headers like this

    $wparg = array(
    				'timeout' => $this->defaults['timeout'],
    				'sslverify' => $this->defaults['sslverify'] ? true : false,
    				'headers' => array( 'referer' => site_url() ),

    everything is working.
    Is nobody protecting their keys with referers or is it only my websites problem?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Http referrer problem’ is closed to new replies.