Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

获取cookie失败 #3396

Closed
wuyugege opened this issue Jan 12, 2019 · 2 comments
Closed

获取cookie失败 #3396

wuyugege opened this issue Jan 12, 2019 · 2 comments

Comments

@wuyugege
Copy link

发送的cookie为:

cookie: 'main[UTMPUSERID]=xf; main[UTMPKEY]=58275'

这样获取cookie:
this.ctx.cookies.get('main[UTMPUSERID]')

打印出来为undefined

@egg-bot
Copy link

egg-bot commented Jan 13, 2019

Hello @wuyugege. Please provide a reproducible example following the instruction.

Issues labeled by Need Reproduce will be closed if no activities in 7 days.


@wuyugege,请根据这个说明提供最小可复现代码。

如果在 7 天内没有进展会被自动关闭。

@dead-horse
Copy link
Member

请先阅读文档寻找答案:https://eggjs.org/zh-cn/core/cookie-and-session.html

this.ctx.cookies.get('main[UTMPUSERID]', { signed: false });

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

No branches or pull requests

4 participants