Skip to content

Async proxy #802

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

Closed
kovacspeter opened this issue Apr 7, 2015 · 4 comments
Closed

Async proxy #802

kovacspeter opened this issue Apr 7, 2015 · 4 comments

Comments

@kovacspeter
Copy link

I need to do some requests(eg. authorization) before proxying. Is there some api support as was before ?

#168
proxy.buffer(req)

Thanks.

@jcrugzz
Copy link
Contributor

jcrugzz commented Apr 7, 2015

@kovacspeter Since node 0.10.x buffering is built into streams so this is no longer necessary. You can do any async call before calling proxy.web as long as you don't need to read data from the req itself.

@kovacspeter
Copy link
Author

I do need to read data request body. I use bodyParser + restreamer + connect as shown in example here. I read body and based on that on that I will send request(on database), depending on answer I will proxy request. Can you give me hand here and advise me how to do it?

Thanks.

@kovacspeter
Copy link
Author

Its easy, you just need to restream it again.

@gvp-adityapraveen
Copy link

@kovacspeter i am in a similar situation can you please post working code , i didn't quite understood restreaming it again part . Any help would be greatly appreciated

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

3 participants