Skip to content

bug or feature? proxying express+socket.io not working out-of-the-box #226

Closed
@ghost

Description

Hi,

I've got an express & socket.io server running, and got node-http-proxy in front of it.
When I do this:

var server = httpProxy.createServer(function (req, res, proxy) {
proxy.proxyRequest(req, res, {
host: '127.0.0.1',
port: '3000'
})
}).listen(8080, '[snip]');

Then it does not seem to proxy websockets. Now the README has something to say about that, but I'm confused - should or shouldn't this work out-of-the-box in my case?

When using the example going with the README, it works fine.. However, that example sets up a specific HttpProxy object in combination with a regular http.createServer(). But I really want to stick to the httpProxy.createServer(), and I do not see how to do that.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions