@@ -6,7 +6,7 @@ var httpProxy = exports,
6
6
https = require ( 'https' ) ,
7
7
web = require ( './passes/web-incoming' ) ,
8
8
ws = require ( './passes/ws-incoming' ) ;
9
-
9
+
10
10
httpProxy . Server = ProxyServer ;
11
11
12
12
/**
@@ -33,7 +33,7 @@ function createRightProxy(type) {
33
33
cntr = args . length - 1 ,
34
34
head , cbl ;
35
35
36
- /* optional args parse begin */
36
+ /* optional args parse begin */
37
37
if ( typeof args [ cntr ] === 'function' ) {
38
38
cbl = args [ cntr ] ;
39
39
@@ -64,7 +64,7 @@ function createRightProxy(type) {
64
64
} ) ;
65
65
66
66
67
- for ( var i = 0 ; i < passes . length ; i ++ ) {
67
+ for ( var i = 0 ; i < passes . length ; i ++ ) {
68
68
/**
69
69
* Call of passes functions
70
70
* pass(req, res, options, head)
@@ -73,7 +73,7 @@ function createRightProxy(type) {
73
73
* refer to the connection socket
74
74
* pass(req, socket, options, head)
75
75
*/
76
- if ( passes [ i ] ( req , res , this . options , head , cbl ? false : this , cbl ) ) { // passes can return a truthy value to halt the loop
76
+ if ( passes [ i ] ( req , res , options , head , cbl ? false : this , cbl ) ) { // passes can return a truthy value to halt the loop
77
77
break ;
78
78
}
79
79
}
@@ -103,9 +103,9 @@ require('util').inherits(ProxyServer, EE3);
103
103
ProxyServer . prototype . listen = function ( port ) {
104
104
var self = this ,
105
105
closure = function ( req , res ) { self . web ( req , res ) ; } ;
106
-
107
- this . _server = this . options . ssl ?
108
- https . createServer ( this . options . ssl , closure ) :
106
+
107
+ this . _server = this . options . ssl ?
108
+ https . createServer ( this . options . ssl , closure ) :
109
109
http . createServer ( closure ) ;
110
110
111
111
if ( this . options . ws ) {
@@ -119,7 +119,7 @@ ProxyServer.prototype.listen = function(port) {
119
119
120
120
ProxyServer . prototype . before = function ( passName , callback ) {
121
121
var i = false ;
122
- this . passes . forEach ( function ( v , idx ) {
122
+ this . passes . forEach ( function ( v , idx ) {
123
123
if ( v . name === passName ) i = idx ;
124
124
} )
125
125
@@ -129,7 +129,7 @@ ProxyServer.prototype.before = function(passName, callback) {
129
129
} ;
130
130
ProxyServer . prototype . after = function ( passName , callback ) {
131
131
var i = false ;
132
- this . passes . forEach ( function ( v , idx ) {
132
+ this . passes . forEach ( function ( v , idx ) {
133
133
if ( v . name === passName ) i = idx ;
134
134
} )
135
135
0 commit comments