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

Using Nodejs websockets is there anyway to access the request context? #167

Open
OultimoCoder opened this issue Oct 10, 2021 · 3 comments
Open
Labels
env-nodejs NodeJS environment related issues/PR

Comments

@OultimoCoder
Copy link

I would like to gain access to the url query parameters the user used to connect to the web socket with, how would I do this? Traditionally I would access req in wss.on('connection'... but I don't have access to that here.

@github-actions
Copy link

Thank you for your first issue! ✨😊

@sanketsudake
Copy link
Member

@OultimoCoder Fission NodeJS environment hosts NodeJs web server only. We will have to analyze here how do you get the needed details in the function or customize the existing environment.

You can refer wss.on handler here which calls user function.

wss.on("connection", function connection(ws) {

If you customize the environment, you just need to rebuild the image for the environment and use it instead of the standard environment.

Please let me know if this helpful for you.

@sanketsudake sanketsudake transferred this issue from fission/fission Oct 13, 2021
@sanketsudake
Copy link
Member

Migrated issue to environments, as related to NodeJS environment.

@sanketsudake sanketsudake added the env-nodejs NodeJS environment related issues/PR label Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
env-nodejs NodeJS environment related issues/PR
Projects
None yet
Development

No branches or pull requests

2 participants