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

[api-bun-serve] Use client IP address for request ID #3

Open
yus-ham opened this issue Aug 4, 2023 · 0 comments
Open

[api-bun-serve] Use client IP address for request ID #3

yus-ham opened this issue Aug 4, 2023 · 0 comments

Comments

@yus-ham
Copy link
Owner

yus-ham commented Aug 4, 2023

Waiting for bun's issue #3540 issue to be resolved!

Thing to be changed

req.clientID || req.generateCID()

blangko/src_api/app.js

Lines 104 to 107 in 3f61001

if (!ctx.req.clientID) {
ctx.req.clientID = ctx.req.cookies.cid
ctx.req.generateCID = _ => ctx.res.cookie('cid', Buffer.from(Bcrypt.genSaltSync()).toString('base64').slice(0, 20))
}

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

1 participant