Limit the development server to sources and dependencies

Vite serves any file under fs.allow through /@fs/, and the default
allow list is the workspace root. In a clusterio checkout that is also
the usual data directory, so with --dev any client that could reach the
controller could fetch config-controller.json, config-ctl.json and the
database without logging in. webpack-dev-middleware only served the
compiled bundles.

Allow the controller, web_ui, lib and dev plugin directories and the
node_modules directories Node.js would resolve their imports from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-27 23:01:12 +00:00
1 parent ebedf6b3b0
commit 5c92a44e65
2 files changed
+21 -2

No files matched your search

-1
View File
@@ -524,7 +524,6 @@ export default class Controller {
server: {
middlewareMode: true,
preTransformRequests: false,
fs: { allow: [vite.searchForWorkspaceRoot(controllerDir), ...pluginDirs.values()] },
},
plugins: [webUiVite.clusterioDevPlugins(pluginDirs)],
});