A few days ago, in order to use idle VPS, a movie station was built with GXCMS, and then swept down to the 360 Website Security Detection area, the system prompts that the XSS vulnerability exists. After checking the vulnerability, the vulnerability does not actually exist, but 360 considers the vulnerability to have been changed. It seems that the security suggestion given in section 360 is only because the url can be submitted with characters such as <>. This VPS is equivalent to the Nginx platform. Just a few days ago, due to the WordPress W3 Total Cache problem, it seems that the Nginx rewrite function is used to solve the 360 problem and let it give me the high security score of this movie station.
When we mention Nginx rewrite and think of the characters such as <> '; in the URL, we only need to judge if to prevent the submitted URL from containing this information. If you don't want to talk about it, directly give it to the Code:
If ($ request_uri ~ * % 3C | % 3E | % 27 ){
Return 404;
}
Add it to server or location. It's easy! View results: