-
Hi everybody, I don't understand how to deny access to all elements in the I used the StackBliz to understand the server.fs.deny setting. I created a new file import { defineConfig, searchForWorkspaceRoot } from 'vite'
export default defineConfig({
server: {
fs: {
deny: [
searchForWorkspaceRoot(process.cwd()),
".git",
".env"
]
}
}
}) then I added an And it worked like charm, and if I navigate to the
So tried to add all the folders or a specific file in the import { defineConfig, searchForWorkspaceRoot } from 'vite'
export default defineConfig({
server: {
fs: {
deny: [
searchForWorkspaceRoot(process.cwd()),
".git",
".env",
//no working config
".git/logs/HEAD",
"/.git/logs/HEAD",
".git/**/**",
"/.git/**/**",
// add answer from Shyam-Chen
"./.git/**"
]
}
}
}) My final goal is to deny the access to all the files and folders of EDIT: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
**/.git/**