mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
test: cover Vite fs deny hardening
This commit is contained in:
1 parent
1b641fde9f
commit
e3e4fc7284
4 files changed
+23
-3
No files matched your search
+5
-1
@@ -18,7 +18,11 @@ const REPO_ROOT = fileURLToPath(new URL('..', import.meta.url))
|
||||
.replace(/\\/g, '/')
|
||||
.replace(/\/$/, '');
|
||||
|
||||
const REPO_ROOT_GLOB = REPO_ROOT.replace(/[()[\]{}*?!+@|]/g, '\\$&');
|
||||
export function escapeFsDenyPath(path) {
|
||||
return path.replace(/[()[\]{}*?!+@|]/g, '\\$&');
|
||||
}
|
||||
|
||||
const REPO_ROOT_GLOB = escapeFsDenyPath(REPO_ROOT);
|
||||
|
||||
/**
|
||||
* Content-Security-Policy for every document the dev/preview server serves.
|
||||
|
||||
Reference in new issue
Block a user