banner
NCC-17039

NCC-17039

欢迎来到NCC-17039的历史数据库!请随便参观,无需多言哦。
email
telegram
bilibili
douban

How to solve the cross-domain problem of Douban pictures?

While researching 豆瓣秀, I discovered that once the JavaScript code of 豆瓣秀 is copied to one's own website, it cannot be loaded due to cross-origin issues. In this case, we only need to bypass the server's cross-origin detection with a simple method.

Add the following code to the head of your HTML file: <meta name="referrer" content="never"> and the problem will be perfectly solved~

When requesting images from another domain, the browser will check the requested address to see if it is from your own server. If it is not from your own server, it will restrict your access to the resource, causing the image to fail to load.
By adding this line of code to the head of our file, we are essentially telling the browser not to check our request address. Therefore, we can access it normally!

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.