~优化arangler配置文件

This commit is contained in:
lsy committed 2026-02-16 13:37:59 +08:00
1 parent aa62887a3a
commit 9e7c43edd0
2 files changed
+17 -1

No files matched your search

+15
View File
@@ -111,4 +111,19 @@ app.route("/api/group", newapiGroupRoutes);
app.route("/v1", proxyRoutes);
app.notFound((c) => {
const path = c.req.path;
if (
path === "/api" ||
path.startsWith("/api/") ||
path === "/v1" ||
path.startsWith("/v1/")
) {
return c.json({ error: "Not Found" }, 404);
}
const assets = (c.env as { ASSETS?: { fetch: (input: Request) => Promise<Response> } })
.ASSETS;
return assets ? assets.fetch(c.req.raw) : c.text("Not Found", 404);
});
export default app;
+2 -1
View File
@@ -14,5 +14,6 @@ database_id = "00000000-0000-0000-0000-000000000000"
[assets]
directory = "../admin/dist"
binding = "ASSETS"
not_found_handling = "single-page-application"
run_worker_first = ["/api/*", "/v1/*"]
run_worker_first = true