-
Notifications
You must be signed in to change notification settings - Fork 2k
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
routing broken with express server #215
Comments
Do Something! |
Don't include the port in the incoming routes. You've already specified this when you call proxyServer.listen(8081);
|
OK Got it! Thanks , Before i close this please help me get this working too.. Server:
and proxy:
The curl request "curl -XGET localhost:8282/hello -v" never returns! |
I see. |
I'm working on making this function properly. It seems like someone just forgot the second half of the implementation. |
Ok - here's the problem with doing this. Since node-http-proxy supports both HTTP and WebSockets, you can't route to a path, since paths are invalid in WebSocket URLs. This is in the specification that you can read here. Sorry, you shouldn't try to use node-http-proxy in this way. I hope this helped you understand! |
Waaaaaiiiiiit. I think I can still add this - give me a few minutes more. |
Yeah, I've got this working. That was harder than I thought it would be. Pull request for this incoming. A few things - I was wrong, WebSockets can have paths, I misread the specification. (Maybe I shouldn't be reading specifications anyways =D). In any case, after the pull request is merged, this should work correctly. This is indeed a bug. Thanks for pointing it out! |
Are you sure what you did was what you wanted!? you seems to be little confused. |
I explained adding the
It did take me a few tries to get this right, mostly because it was hard to understand what the old code was actually doing. =P On Thursday, March 29, 2012 at 12:24 AM, kul wrote:
|
And yes - it will work after the pull request is merged and the package is published to npm. On Thursday, March 29, 2012 at 6:34 AM, Christian Howe wrote:
|
The 0.8.1 version is out, @kul can you test again please? |
Tested. OK. |
I have following setup
$ node -v
v0.6.11
$ npm list
blah/blah/blee/nodex
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
└─┬ [email protected]
├── [email protected]
├── [email protected]
└─┬ [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
└── [email protected]
Issue:
I have this simple express server
And following simple proxy.js
Just doesnt works!
$ curl -XGET http://localhost:8080/ -v
...
ok!
...
$ curl -XGET http://localhost:8081/ -v
blah blah...
NOT FOUND
..blah bleh
..
The text was updated successfully, but these errors were encountered: