mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
fix: harden input validation, redirect safety, and error resilience
This commit is contained in:
8 files changed
+208
-97
No files matched your search
+1
-1
@@ -7,6 +7,7 @@ import { createActionRoutes } from "./action-routes";
|
||||
import { createAdminRoutes } from "./admin-routes";
|
||||
import { createLegalRoutes } from "./legal-routes";
|
||||
import { createHomeRoutes } from "./home-routes";
|
||||
import { loadConfig } from "./config";
|
||||
import { log } from "./log";
|
||||
|
||||
const MAX_BODY_SIZE = 1024 * 1024;
|
||||
@@ -58,7 +59,6 @@ export function createServer(): Hono<{ Bindings: Env }> {
|
||||
await c.env.KV.put(`delivery:${delivery}`, "1", { expirationTtl: 300 });
|
||||
}
|
||||
|
||||
const { loadConfig } = await import("./config");
|
||||
const config = await loadConfig(c.env);
|
||||
const dispatch = dispatchEvent(config, event, c.env).catch((err) =>
|
||||
log.error(err, "Dispatch failed"),
|
||||
|
||||
Reference in new issue
Block a user