syntaur 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/server.js +4 -3
- package/dist/dashboard/server.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10935,8 +10935,9 @@ function createDashboardServer(options) {
|
|
|
10935
10935
|
app.use("/api/projects/:projectId/todos", createProjectTodosRouter(projectsDir2, broadcast));
|
|
10936
10936
|
app.use("/api/backup", createBackupRouter());
|
|
10937
10937
|
if (serveStaticUi && dashboardDistPath) {
|
|
10938
|
-
|
|
10939
|
-
app.use(express.static(dashboardDistPath,
|
|
10938
|
+
const sendOpts = { dotfiles: "allow" };
|
|
10939
|
+
app.use("/assets", express.static(resolve21(dashboardDistPath, "assets"), sendOpts));
|
|
10940
|
+
app.use(express.static(dashboardDistPath, { ...sendOpts, index: false, fallthrough: true }));
|
|
10940
10941
|
app.get("{*path}", async (req, res) => {
|
|
10941
10942
|
if (req.path.startsWith("/api") || req.path === "/ws" || req.path.startsWith("/assets")) {
|
|
10942
10943
|
res.status(404).json({ error: "Not Found" });
|
|
@@ -10949,7 +10950,7 @@ function createDashboardServer(options) {
|
|
|
10949
10950
|
);
|
|
10950
10951
|
return;
|
|
10951
10952
|
}
|
|
10952
|
-
res.sendFile(indexPath, (err2) => {
|
|
10953
|
+
res.sendFile(indexPath, sendOpts, (err2) => {
|
|
10953
10954
|
if (err2) {
|
|
10954
10955
|
console.error("Error sending dashboard index.html:", err2);
|
|
10955
10956
|
if (!res.headersSent) res.status(500).send("Dashboard load error");
|