mercredi 25 février 2015

Youtube No 'Access-Control-Allow-Origin' header is present on the requested resource error


I have a strange issue on a site I am working on. I have added a link that opens a youtube video in a popup. It works fine on all pages, but if I do a search, something like http://ift.tt/1zg5KUu, and then attempt to open the video, it won't load and I get this error:



XMLHttpRequest cannot load http://ift.tt/1wqoplQ. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://ift.tt/1zg5N2v' is therefore not allowed access.



I have searched pretty extensively about this issue and the consensus it this is an issue with the header sent by youtube. But as youtube is clearly not blocking remote access to videos, I am at a complete loss as to why this would be happening and also only when there is a query string on the URL.


I have tried changing the link I use to youtube changing it to http from https, adding and removing other portions of the query string, using the short url, really anything I could think of no matter how silly seeming.


Any thoughts would be greatly appreciated.


The video can be opened by click on the "Video of the Day" button toward the top of the page. The link is on all pages.





Aucun commentaire:

Enregistrer un commentaire