Add Secure and httpOnly Flags to Every Set-Cookie Response in Apache httpd

后端 未结 4 833
我在风中等你
我在风中等你 2021-01-30 18:20

I\'m running Apache 2.2.26:

Server version: Apache/2.2.26 (Unix)
Server built:   Jan 17 2014 12:24:49
Cpanel::Easy::Apache v3.22.30 rev9999 +cloudlinux
         


        
4条回答
  •  执念已碎
    2021-01-30 19:11

    This will add the tag to only those cookies that need it:

    Header always edit Set-Cookie "^((?!;\s?[Ss]ecure).)+$" "$0; Secure"
    

提交回复
热议问题