switch from legacy FS functions to new constructor

This commit is contained in:
Umputun 2022-01-06 00:12:29 -06:00
parent 1315f04ddf
commit a963516783

View File

@ -361,9 +361,9 @@ func (h *Http) fileServer(assetsWebRoot, assetsLocation string, spa bool, notFou
notFoundReader = bytes.NewReader(notFound)
}
if spa {
return R.FileServerSPA(assetsWebRoot, assetsLocation, notFoundReader)
return R.NewFileServer(assetsWebRoot, assetsLocation, R.FsOptCustom404(notFoundReader), R.FsOptSPA)
}
return R.FileServer(assetsWebRoot, assetsLocation, notFoundReader)
return R.NewFileServer(assetsWebRoot, assetsLocation, R.FsOptCustom404(notFoundReader))
}
func (h *Http) isAssetRequest(r *http.Request) bool {