File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -26,17 +26,13 @@ export class FastifyLoader extends AbstractLoader {
2626 optionsArr . forEach ( options => {
2727 options . renderPath = options . renderPath || DEFAULT_RENDER_PATH ;
2828
29- const { setHeaders, redirect, ...send } =
30- options . serveStaticOptions || ( { } as any ) ;
3129 const clientPath = options . rootPath || DEFAULT_ROOT_PATH ;
3230 const indexFilePath = this . getIndexFilePath ( clientPath ) ;
3331
3432 if ( options . serveRoot ) {
3533 app . register ( fastifyStatic , {
3634 root : clientPath ,
37- setHeaders,
38- redirect,
39- send,
35+ ...( options . serveStaticOptions || { } ) ,
4036 wildcard : false ,
4137 prefix : options . serveRoot
4238 } ) ;
@@ -53,9 +49,7 @@ export class FastifyLoader extends AbstractLoader {
5349 } else {
5450 app . register ( fastifyStatic , {
5551 root : clientPath ,
56- setHeaders,
57- redirect,
58- send,
52+ ...( options . serveStaticOptions || { } ) ,
5953 wildcard : false
6054 } ) ;
6155 app . get ( options . renderPath , ( req : any , res : any ) => {
You can’t perform that action at this time.
0 commit comments