Skip to content

Commit d0f1dfe

Browse files
committed
[fix] style nits
1 parent 220f5fb commit d0f1dfe

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Diff for: lib/http-proxy.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!)
1+
// Use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!)
22
var ProxyServer = require('./http-proxy/index.js').Server;
33

44

@@ -18,7 +18,7 @@ var ProxyServer = require('./http-proxy/index.js').Server;
1818
*/
1919

2020

21-
var createProxyServer = function(options) {
21+
function createProxyServer(options) {
2222
/*
2323
* `options` is needed and it must have the following layout:
2424
*
@@ -35,7 +35,7 @@ var createProxyServer = function(options) {
3535
* ignorePath: <true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request>
3636
* localAddress : <Local interface string to bind for outgoing connections>
3737
* changeOrigin: <true/false, Default: false - changes the origin of the host header to the target URL>
38-
* auth : Basic authentication i.e. 'user:password' to compute an Authorization header.
38+
* auth : Basic authentication i.e. 'user:password' to compute an Authorization header.
3939
* hostRewrite: rewrites the location hostname on (301/302/307/308) redirects, Default: null.
4040
* autoRewrite: rewrites the location host/port on (301/302/307/308) redirects based on requested host/port. Default: false.
4141
* protocolRewrite: rewrites the location protocol on (301/302/307/308) redirects to 'http' or 'https'. Default: null.

Diff for: lib/http-proxy/passes/web-incoming.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
* @api private
2929
*/
3030

31-
deleteLength : function deleteLength(req, res, options) {
31+
deleteLength: function deleteLength(req, res, options) {
3232
if((req.method === 'DELETE' || req.method === 'OPTIONS')
3333
&& !req.headers['content-length']) {
3434
req.headers['content-length'] = '0';
@@ -62,7 +62,7 @@ module.exports = {
6262
* @api private
6363
*/
6464

65-
XHeaders : function XHeaders(req, res, options) {
65+
XHeaders: function XHeaders(req, res, options) {
6666
if(!options.xfwd) return;
6767

6868
var encrypted = req.isSpdy || common.hasEncryptedConnection(req);
@@ -94,7 +94,7 @@ module.exports = {
9494
* @api private
9595
*/
9696

97-
stream : function stream(req, res, options, _, server, clb) {
97+
stream: function stream(req, res, options, _, server, clb) {
9898

9999
// And we begin!
100100
server.emit('start', req, res, options.target)

Diff for: lib/http-proxy/passes/web-outgoing.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = { // <--
2323
*
2424
* @api private
2525
*/
26-
removeChunked : function removeChunked(req, res, proxyRes) {
26+
removeChunked: function removeChunked(req, res, proxyRes) {
2727
if (req.httpVersion === '1.0') {
2828
delete proxyRes.headers['transfer-encoding'];
2929
}
@@ -82,7 +82,7 @@ module.exports = { // <--
8282
*
8383
* @api private
8484
*/
85-
writeHeaders : function writeHeaders(req, res, proxyRes, options) {
85+
writeHeaders: function writeHeaders(req, res, proxyRes, options) {
8686
var rewriteCookieDomainConfig = options.cookieDomainRewrite;
8787
if (typeof rewriteCookieDomainConfig === 'string') { //also test for ''
8888
rewriteCookieDomainConfig = { '*': rewriteCookieDomainConfig };
@@ -107,7 +107,7 @@ module.exports = { // <--
107107
*
108108
* @api private
109109
*/
110-
writeStatusCode : function writeStatusCode(req, res, proxyRes) {
110+
writeStatusCode: function writeStatusCode(req, res, proxyRes) {
111111
// From Node.js docs: response.writeHead(statusCode[, statusMessage][, headers])
112112
if(proxyRes.statusMessage) {
113113
res.writeHead(proxyRes.statusCode, proxyRes.statusMessage);

0 commit comments

Comments
 (0)