Reputation: 1113
I am trying to setup grunt-contrib-connect
to supply a proxy for my XHR calls. I found grunt-connect-proxy
which seems to be what I want. But I am behind a corporate firewall that does not allow the requests from node
to pass through.
The error I get is:
An error has occurred: {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect"}
How do I setup the connect
task so that it passes through the corporate firewall?
Upvotes: 2
Views: 1448
Reputation: 1113
So, I finally found out how to do it.
connect : {
server: {
proxies: [
{
context: '/proxy',
host: 'proxyhost', // e.g. someproxy.com
port: 8080, // proxy port
headers: {
Host: "example.com" // the real host you want to access
}
}
]
}
}
Upvotes: 4