How to remove the cookie secure flag?

208 views
Skip to first unread message

Peng Liu

unread,
Dec 16, 2016, 11:38:54 PM12/16/16
to openresty-en
Hi,

For our application special requirement, we need to remove the cookie secure flag in the "Set-Cookie"? What is a easy way to do that with openresty lua module?

Thanks
Liu Peng

Robert Paprocki

unread,
Dec 18, 2016, 4:06:35 PM12/18/16
to openre...@googlegroups.com
Hi,

On Fri, Dec 16, 2016 at 8:38 PM, Peng Liu <liupe...@gmail.com> wrote:
Hi,

For our application special requirement, we need to remove the cookie secure flag in the "Set-Cookie"? What is a easy way to do that with openresty lua module?

Sounds like lua-resty-cookie (https://github.com/cloudflare/lua-resty-cookie) would be a good use for this; this module lets you programatically work with cookies as objects (tables) and manipulate various cookie attributes, including the Secure flag.

Peng Liu

unread,
Dec 22, 2016, 12:22:06 AM12/22/16
to openre...@googlegroups.com
Yes. I worked it out and remove the secure flag with ngx.header.set_cookie. Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "openresty-en" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openresty-en/nriSHYhi6r0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openresty-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages