希望官方可以在nginx默认配置文件中增加,以增强相关的安全性,或者加上开关,让有需要的人加上。
- # security headers
- add_header X-XSS-Protection "1; mode=block" always;
- add_header X-Content-Type-Options "nosniff" always;
- add_header Referrer-Policy "no-referrer-when-downgrade" always;
- add_header Content-Security-Policy "default-src 'self' http: https: ws: wss: data: blob: 'unsafe-inline'; frame-ancestors 'self';" always;
- add_header Permissions-Policy "interest-cohort=()" always;
- add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
- }
复制代码
|
|