Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

小白一枚,请教一下大佬如何在api里面默认cookie设置为自己的 #1856

Open
lzh-zone opened this issue Dec 21, 2023 · 1 comment

Comments

@lzh-zone
Copy link

环境

  • 系统/平台: Centos Stream9

  • nodejs 版本: v18.17.1

  • API版本: 1.02

出现问题

小白一枚,请教一下大佬如何在api里面默认cookie设置为自己的

重现步骤

我在根目录里的server.js的160行的req.cookies = {}添加cookie之后,部署之后报内部500错误

期待效果

能加入自己的cookie作为默认cookie进行调用

@2061360308
Copy link
Contributor

不自己加cookie,浏览器自己会处理,要不你就仔细看看代码里cookie的传入格式,传入正确格式的cookie,而且cookie14天还是15天一更新,写死不好吧

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

No branches or pull requests

2 participants