1.8.1 【必須】限定JSONP接口的callback字符集范圍
[a-zA-Z0-9_-]+
1.8.2 【必須】安全的CORS配置
^https://domain\.qq\.com$
// good:使用全等于,校驗請求的Origin
if (req.headers.origin === 'https://domain.qq.com') {
res.setHeader('Access-Control-Allow-Origin', req.headers.origin);
res.setHeader('Access-Control-Allow-Credentials', true);
}
關聯(lián)漏洞:中風險 - XSS,中風險 - CSRF,中風險 - CORS配置不當
更多建議: