Referrer Policy: strict-origin-when-cross-origin solution

problem overview

Regarding this problem, I encountered it during the development of the WeChat official account.

When configuring the domain name to make a call, it appears: "  Referrer Policy: strict-origin-when-cross-origin "

As shown below:

Solution

Regarding this issue, it is actually somewhat misleading. After a systematic investigation, it was found that it was caused by the domain name IP authorization of the WeChat official account.

Therefore, this question is only aimed at the development and docking of the WeChat public account platform .

Two solutions to this problem were considered:

1. The requested domain name IP problem (the blogger is caused by this problem),

Log in to the "WeChat Official Account Platform" > Settings and Development > Basic Settings > IP Whitelist > Add the IP mapped to the domain name of the WeChat webpage on the web side. If there are
multiple domain names, press Enter (new line) to fill in,

As shown in the figure below, the request can be successful after the solution:

2. Another problem with this problem is the cross-domain problem.

Due to the HTTPS and HTTP cross-domain problem, the original website uses the HTTPS protocol, but the form submitted, Ajax or HTTP is used, you only need to change the original HTTP protocol to the HTTPS protocol of the website!

3. Check other methods


Well, the solution to Referrer Policy: strict-origin-when-cross-origin is written here. If you have any questions or encounter any problems, please scan the QR code to ask questions, and you can also leave me a message. for a detailed answer. 
Xiehouyu: "Learning together, making progress together", I also hope that everyone will pay more attention to the IT community of CSND.


author: Andy
Contact the author: [email protected]
Source: CSDN (Chinese Software Developer Network)
Original text: https://blog.csdn.net/Hello_World_QWP/article/details/126372484
Copyright Notice: This article is the blogger's original article, please be sure to indicate the source of the blog post when reprinting!

Guess you like

Origin blog.csdn.net/Hello_World_QWP/article/details/126372484