quicklink icon indicating copy to clipboard operation
quicklink copied to clipboard

How to solve the CORS of prefetcher

Open chaihongjun opened this issue 4 years ago • 0 comments

I want to grab the hyperlink image and video link of the current page. my configuration is as follows: ` window.addEventListener('load', () => { let imgSrcs = []; let imgs = document.getElementsByTagName('img'); for (let i = 0; i < imgs.length; i++) { imgSrcs.push(imgs[i].src) }; let videoSrcs = []; let videos = document.getElementsByTagName('video'); for (let i = 0; i < videos.length; i++) { videoSrcs.push(videos[i].src) }; let aLinks = []; let links = document.getElementsByTagName('a'); for (let i = 0; i < links.length; i++) { aLinks.push(links[i].href) }; let urlss = imgSrcs.concat(videoSrcs, aLinks); quicklink.prefetch(urlss,true); });

the hyperlink including some other domains i have enables CORS on Server i have used this method by this link https://enable-cors.org/server_nginx.html But still failed. soquicklink.prefetch()` can provide the CORS option ?

chaihongjun avatar Apr 10 '20 02:04 chaihongjun