morto
morto

Reputation: 73

express node-http-proxy , proxy.proxyRequest to https server?

Is it possible to use the node-http-prox module and proxy.proxyRequest to a https server? I tried to do the following but doesnt seem to work.

app.get('/c/users/moreuser', function(req, res) {
    proxy.proxyRequest(req, res, {
        host: 'api.example.com',
        port: 80,
        https: true
    });
});

doing this i dont get any response from the server. But i can get response directly from the server.

Upvotes: 1

Views: 1057

Answers (1)

Peter Lyons
Peter Lyons

Reputation: 146014

try port: 443, which is the default port for HTTPS.

Upvotes: 1

Related Questions