File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,11 @@ const httpsOpts = {
1818}
1919
2020const proxyConfigTest = {
21- "/rewrite/*" : {
21+ "/rewrite/** " : {
2222 "target" : "http://localhost:8082" ,
2323 "pathRewrite" : {
2424 "^/rewrite" : ""
2525 }
26- } ,
27- "*" : {
28- "target" : "http://localhost:8082" ,
29- "changeOrigin" : true ,
30- "secure" : false
3126 }
3227}
3328
@@ -55,6 +50,7 @@ test('proxy config', (t) => {
5550
5651 // Another server proxies 8083 to 8082
5752 const proxyServer = httpServer . createServer ( {
53+ root,
5854 //tls: true,
5955 //https: httpsOpts,
6056 proxyConfig : proxyConfigTest
@@ -70,7 +66,7 @@ test('proxy config', (t) => {
7066
7167 // File content matches
7268 const fileData = await fsReadFile ( path . join ( root , 'file' ) , 'utf8' )
73- t . equal ( res . body . trim ( ) , fileData . trim ( ) , 'proxied file content matches' )
69+ t . equal ( res . body . trim ( ) , fileData . trim ( ) , 'none proxied file content matches' )
7470 } ) . catch ( err => t . fail ( err . toString ( ) ) )
7571
7672 // Serve files from proxy with rewrite
You can’t perform that action at this time.
0 commit comments