Skip to content

Instantly share code, notes, and snippets.

@meineerde
Last active October 20, 2021 09:43
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save meineerde/eedbc53fd28984f60907 to your computer and use it in GitHub Desktop.
Save meineerde/eedbc53fd28984f60907 to your computer and use it in GitHub Desktop.
Set all cookies set in the HTTP response to HttpOnly
acl httponly_cookie res.hdr(Set-Cookie),lower -m sub httponly
rspirep ^(set-cookie:.*) \1;\ HttpOnly if !httponly_cookie
@devendrajoshi9987
Copy link

devendrajoshi9987 commented Mar 1, 2017

HI,

Can i set cookie for JSESSIONID only. means i dont want to user .*
Like : -
rspirep ^(set-cookie:JSSSSIONID) \1;\ HttpOnly

@cnzzr
Copy link

cnzzr commented Apr 25, 2019

将服务器返回的Set-Cookie值中的 Secure 删除
http-response replace-header Set-Cookie (JSSSSIONID=[^;]);\ Secure(.) \1\2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment