HTTP头与Secure问题的解决方法参考.txt 493 B

123456789101112131415
  1. server {
  2. add_header X-Content-Type-Options nosniff;
  3. add_header Strict-Transport-Security max-age=31536000;
  4. add_header Set-Cookie "/; Secure; HttpOnly; SameSite=None";
  5. location / {
  6. ## 上面3行,与这里下面4行,顺序不能搞错。
  7. add_header Set-Cookie "Secure";
  8. add_header X-Content-Type-Options nosniff;
  9. add_header Strict-Transport-Security max-age=31536000;
  10. add_header Set-Cookie "/; Secure; HttpOnly; SameSite=None";
  11. }
  12. }