Skip to content

防止本网站出现其他网站的东西和广告 #17

Description

@LSYY888

解决方案:

<meta http-equiv="Content-Security-Policy" content="default-src *.cim120.com.cn *.cim120.com *.cim120.cn; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval';">
*.cim120.com.cn *.cim120.com *.cim120.cn

注:这几个域名就相当于一个白名单,你想让谁访问你的网站,谁才可以访问你的网站。

学习资料:http://www.ruanyifeng.com/blog/2016/09/csp.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions