goal
Nginx配置添加header头"X-Frame-Options"
配置:
- 在nginx location模块下添加一行:
- add_header x-Frame-Options ALLOW_FROM https://payapp.weixin.qq.com;
error
nginx -t 提示
[emerg] invalid parameter “https//payapp.weixin.qq.com” in xxx.conf
solution
添加运行的关键字和地址加双引号即可
add_header x-Frame-Options “ALLOW_FROM https://payapp.weixin.qq.com”;