Groups
Sign in
Groups
openresty
Conversations
Labels
About
Send feedback
Help
ngx_lua库的set-cookie问题
54 views
Skip to first unread message
HN Z (Ne)
unread,
Sep 20, 2023, 10:22:59 PM
9/20/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openresty
使用中发现,无论是使用ngx.header['Set-Cookie']方法还是ngx.header.set_cookie方式来setcookie,仅最后一次set生效。对于比较复杂的请求处理,需要在不同阶段决定是否set cookie时,有没有可行方案呢?
along
unread,
Feb 3, 2024, 11:07:59 PM
Feb 3
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openresty
https://github.com/cloudflare/lua-resty-cookie
可以看下,这个是不是可以满足你的需求
Junlong li
unread,
Feb 4, 2024, 5:42:13 AM
Feb 4
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openresty
对于 cookies,你应该用 GET MODIFY SET这样的方式。而不是直接 SET
On Sunday, February 4, 2024 at 12:07:59 PM UTC+8 along wrote:
https://github.com/cloudflare/lua-resty-cookie
可以看下,这个是不是可以满足你的需求
Reply all
Reply to author
Forward
0 new messages