X-Frame-Options头未设置,如何设置

 时间:2024-10-13 13:39:26

1、在网站根目录下创建一个web.config文件(适用于Windows系统),代码如下:<?xml version=媪青怍牙"1.0" encoding="UTF-8"?><configuration> <system.webServer>...<httpProtocol> <customHeaders> <add name="X-Frame-Options" value="SAMEORIGIN" /> </customHeaders></httpProtocol>...</system.webServer></configuration>这样就给网站添加X-frame-options响应头,且赋值为SAMEORIGIN。就设置好了X-Frame-Options头。其实SAMEORIGIN的作用是页面只能被本站页面嵌入到iframe或者frame中。

X-Frame-Options头未设置,如何设置
  • 汽车火花塞在哪里
  • 小米12怎么关闭上滑搜索
  • adb命令的使用
  • xshell如何设置保持活动状态间隔
  • 小米11手机怎样设置性能模式
  • 热门搜索
    鸡肉怎么炒好吃又嫩 过敏性咳嗽怎么治疗 头发为什么会分叉 疥疮怎么治疗 黄油蛋糕的做法 花怎么折 聿字怎么读 土豆丝怎么切 春节用英语怎么说 血红蛋白低是怎么回事