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

[Feature] Create a global vercel like context #540

Open
conico974 opened this issue Oct 10, 2024 · 0 comments
Open

[Feature] Create a global vercel like context #540

conico974 opened this issue Oct 10, 2024 · 0 comments

Comments

@conico974
Copy link
Contributor

We should create a global request context with AsyncLocalStorage that would look like the vercel request context and would allow us to hook into next/after easily.
We already have a global.__als, but it should be on every function and should cover the middleware as well

It could also allow people to access stuff like headers or cookies even in ISR/SSG

This would also allow us to provide a @vercel/request-context for libs that rely on this to detect if next is running in serverless (This should probably be optional since it could break some lib)

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