日本乱理伦片在线观看真_久久国产综合精品swag_日本护士高清喷水_久久久噜噜噜久久中文_国内真实愉拍系列在线

首頁  >  新聞動態(tài)  > 網(wǎng)站知識 > 服務器安全

服務端設置CSP(Content Security Policy,即內(nèi)容安全策略)

通過設置 HTTP 響應頭來聲明 CSP 和X-Frame-Options,例如:

# 不允許被嵌入,包括<frame>, <iframe>, <object>, <embed> 和 <applet>
Content-Security-Policy: frame-ancestors 'none'
# 只允許被同源的頁面嵌入
Content-Security-Policy: frame-ancestors 'self'
# 只允許被白名單內(nèi)的頁面嵌入
Content-Security-Policy: frame-ancestors www.example.com

# 不允許被嵌入,包括<frame>, <iframe>, <embed> 和 <object>
X-Frame-Options: deny
# 只允許被同源的頁面嵌入
X-Frame-Options: sameorigin
# (已廢棄)只允許被白名單內(nèi)的頁面嵌入
X-Frame-Options: allow-from www.example.com

相關文章
http://m.huimenpiao.org.cn/Content/weixinlogo.jpg
閱速CMS系統(tǒng)提供用戶體驗更佳的國內(nèi)Cms軟件
服務端設置CSP(Content Security Policy,即內(nèi)容安全策略)