background

Your own blog image links use the graph bed of site B. If you use these links directly, you will return 403. When I was making the short chain generator of station B today, I wanted to open the generated short chain directly in a new window after clicking it, and the page showed 403. It was normal to click enter again in the address bar or copy the link to open it.

why

The reason is the same, because the anti-theft link is enabled in station B, and the Referer attribute of HTTP is used to make judgment. If Referer is not on his whitelist, 403 is returned.

The solution

Whole site picture use

If you set the following flag in the HTML head tag, site-wide resource references will not carry the referrer

<meta name="referrer" content="no-referrer">

Copy the code

New window opens

The main setting is rel=”noreferrer”, window.open will carry the referrer by default, the first time will still be 403

<a rel="noreferrer" target="_blank"></a>

Copy the code

recommended

B station short chain generator

B map bed plug-in

Typora B station map plug-in paste upload

This article uses the article synchronization assistant to synchronize