Skip to content

Commit cfbb88e

Browse files
committed
fix: fixed tests
1 parent f89fbc1 commit cfbb88e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ const parse = require('url-parse');
99
const proxyWrap = require('findhit-proxywrap');
1010
const { boolean } = require('boolean');
1111

12-
const router = new Router();
13-
14-
function middleware(request, response) {
15-
return router(request, response, finalhandler(request, response));
16-
}
17-
1812
class ProxyServer {
1913
constructor(config) {
2014
this.config = {
@@ -40,6 +34,12 @@ class ProxyServer {
4034
...config
4135
};
4236

37+
const router = new Router();
38+
39+
function middleware(request, response) {
40+
return router(request, response, finalhandler(request, response));
41+
}
42+
4343
const proxiedHttp = proxyWrap.proxy(http, this.config.proxyOptions);
4444

4545
// support for lets encrypt verification

0 commit comments

Comments
 (0)