v1.0 with SW PWA enabled
This commit is contained in:
3
frontend/node_modules/vite/dist/node-cjs/publicUtils.cjs
generated
vendored
3
frontend/node_modules/vite/dist/node-cjs/publicUtils.cjs
generated
vendored
@ -5552,7 +5552,8 @@ function isUriInFilePath(uri, filePath) {
|
||||
function isFileLoadingAllowed(server, filePath) {
|
||||
const { fs } = server.config.server;
|
||||
if (!fs.strict) return true;
|
||||
if (server._fsDenyGlob(filePath)) return false;
|
||||
const filePathWithoutTrailingSlash = filePath.endsWith("/") ? filePath.slice(0, -1) : filePath;
|
||||
if (server._fsDenyGlob(filePathWithoutTrailingSlash)) return false;
|
||||
if (server.moduleGraph.safeModulesPath.has(filePath)) return true;
|
||||
if (fs.allow.some((uri) => isUriInFilePath(uri, filePath))) return true;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user