File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
client/src/servers/common Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -30,17 +30,23 @@ class ProxyHelper {
3030 this . defineStaticProxy (
3131 app ,
3232 "/browser.config.js" ,
33- `${ this . wwwTarget } /browser.config.js`
33+ `${ this . wwwTarget } /browser.config.js` ,
34+ { maxAge : "1h" }
3435 ) ;
35- this . defineStaticProxy ( app , "/build" , `${ this . wwwTarget } /build` ) ;
36- this . defineStaticProxy ( app , "/static" , `${ this . wwwTarget } /static` ) ;
36+ this . defineStaticProxy ( app , "/build" , `${ this . wwwTarget } /build` , {
37+ maxAge : "1y" ,
38+ immutable : true
39+ } ) ;
40+ this . defineStaticProxy ( app , "/static" , `${ this . wwwTarget } /static` , {
41+ maxAge : "1h"
42+ } ) ;
3743 }
3844
39- defineStaticProxy ( app , proxyPath , target ) {
45+ defineStaticProxy ( app , proxyPath , target , serveStaticOptions = { } ) {
4046 ch . background (
4147 `${ this . name } server will proxy ${ proxyPath } requests to ${ target } .`
4248 ) ;
43- app . use ( proxyPath , serveStatic ( target ) ) ;
49+ app . use ( proxyPath , serveStatic ( target , serveStaticOptions ) ) ;
4450 }
4551
4652 defineProxy ( app , proxyPath , target , logLevel = "silent" ) {
You can’t perform that action at this time.
0 commit comments