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

缺少tunnelId #6

Open
rayyzhong opened this issue Dec 13, 2020 · 1 comment
Open

缺少tunnelId #6

rayyzhong opened this issue Dec 13, 2020 · 1 comment

Comments

@rayyzhong
Copy link

image

socket建立连接时,是通过url参数提交tunnelId的,

wss://domain.com/?tunnelId=e6ff4f5e-219e-4582-8eb7-b828361ab9ae&tcId=7d73ae32b755aed8bc9a5b084525fb72

但看代码像是从cookie里拿,这里是不是需要优化?

ws.send({ errno: 401, errmsg: "缺少tunnelId" });

@miwoy
Copy link
Owner

miwoy commented Jan 18, 2021

cookie中间件有处理url参数,同时支持cookie和url参数两种方式传递

let querystring = ws._ws.upgradeReq.url.split("?")[1];

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

No branches or pull requests

2 participants