diff --git a/lib/http-proxy.js b/lib/http-proxy.js index 44e723f..40f2e4b 100644 --- a/lib/http-proxy.js +++ b/lib/http-proxy.js @@ -1,4 +1,4 @@ - //use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!) + // Use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!) var ProxyServer = require('./http-proxy/index.js').Server; @@ -18,7 +18,7 @@ var ProxyServer = require('./http-proxy/index.js').Server; */ -var createProxyServer = function(options) { +function createProxyServer(options) { /* * `options` is needed and it must have the following layout: * @@ -35,7 +35,7 @@ var createProxyServer = function(options) { * ignorePath: * localAddress : * changeOrigin: - * auth : Basic authentication i.e. 'user:password' to compute an Authorization header. + * auth : Basic authentication i.e. 'user:password' to compute an Authorization header. * hostRewrite: rewrites the location hostname on (301/302/307/308) redirects, Default: null. * autoRewrite: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false. * protocolRewrite: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null. diff --git a/lib/http-proxy/passes/web-incoming.js b/lib/http-proxy/passes/web-incoming.js index df5dfb5..16a122d 100644 --- a/lib/http-proxy/passes/web-incoming.js +++ b/lib/http-proxy/passes/web-incoming.js @@ -28,7 +28,7 @@ module.exports = { * @api private */ - deleteLength : function deleteLength(req, res, options) { + deleteLength: function deleteLength(req, res, options) { if((req.method === 'DELETE' || req.method === 'OPTIONS') && !req.headers['content-length']) { req.headers['content-length'] = '0'; @@ -62,7 +62,7 @@ module.exports = { * @api private */ - XHeaders : function XHeaders(req, res, options) { + XHeaders: function XHeaders(req, res, options) { if(!options.xfwd) return; var encrypted = req.isSpdy || common.hasEncryptedConnection(req); @@ -94,7 +94,7 @@ module.exports = { * @api private */ - stream : function stream(req, res, options, _, server, clb) { + stream: function stream(req, res, options, _, server, clb) { // And we begin! server.emit('start', req, res, options.target) diff --git a/lib/http-proxy/passes/web-outgoing.js b/lib/http-proxy/passes/web-outgoing.js index e00bf50..e2d957f 100644 --- a/lib/http-proxy/passes/web-outgoing.js +++ b/lib/http-proxy/passes/web-outgoing.js @@ -23,7 +23,7 @@ module.exports = { // <-- * * @api private */ - removeChunked : function removeChunked(req, res, proxyRes) { + removeChunked: function removeChunked(req, res, proxyRes) { if (req.httpVersion === '1.0') { delete proxyRes.headers['transfer-encoding']; } @@ -82,7 +82,7 @@ module.exports = { // <-- * * @api private */ - writeHeaders : function writeHeaders(req, res, proxyRes, options) { + writeHeaders: function writeHeaders(req, res, proxyRes, options) { var rewriteCookieDomainConfig = options.cookieDomainRewrite; if (typeof rewriteCookieDomainConfig === 'string') { //also test for '' rewriteCookieDomainConfig = { '*': rewriteCookieDomainConfig }; @@ -107,7 +107,7 @@ module.exports = { // <-- * * @api private */ - writeStatusCode : function writeStatusCode(req, res, proxyRes) { + writeStatusCode: function writeStatusCode(req, res, proxyRes) { // From Node.js docs: response.writeHead(statusCode[, statusMessage][, headers]) if(proxyRes.statusMessage) { res.writeHead(proxyRes.statusCode, proxyRes.statusMessage);