var connect = ;var url = ;var proxy = ;var app = ;app;// now requests to '/api/x/y/z' are proxied to ''//same as example above but also uses a short hand string only parameterapp;
route: you can pass the route for connect middleware within the options, as well.
via: by default no via header is added. If you pass
truefor this option the local hostname will be used for the via header. You can also pass a string for this option in which case that will be used for the via header.
cookieRewrite: this option can be used to support cookies via the proxy by rewriting the cookie domain to that of the proxy server. By default cookie domains are not rewritten. The
cookieRewriteoption works as the
viaoption - if you pass
truethe local hostname will be used, and if you pass a string that will be used as the rewritten cookie domain.
preserveHost: When enabled, this option will pass the Host: line from the incoming request to the proxied host. Default:
var proxyOptions = url;proxyOptionsroute = '/api';var middleWares = /*, ...*/;// Grunt connect uses this method;