Discuz!X3.4 X3.5站点配置文件中增加以下X-Frame规则提升安全性
[md]Discuz!X3.4 X3.5建议在站点配置文件中增加以下规则提升安全性:**
* 使用NGINX需在conf配置:
```
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
```
* 使用Apache需在httpd.conf配置:
```
Header always append X-Frame-Options SAMEORIGIN
```
* 使用IIS需在Web.config中配置:
```
<system.webServer>
...
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
...
</system.webServer>
```
[/md]
* 使用NGINX需在conf配置:
```
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
```
* 使用Apache需在httpd.conf配置:
```
Header always append X-Frame-Options SAMEORIGIN
```
* 使用IIS需在Web.config中配置:
```
<system.webServer>
...
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
...
</system.webServer>
```
[/md]