mflodin
mflodin

Reputation: 1113

How do I configure grunt-connect-proxy behind a firewall?

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

Answers (1)

mflodin
mflodin

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

Related Questions