Development #24

Merged
kyle merged 35 commits from development into main 2026-08-28 10:40:10 -05:00
Showing only changes of commit 13481936f0 - Show all commits
+6 -1
View File
@@ -1,8 +1,13 @@
import { createStart } from "@tanstack/react-start"; import { createCsrfMiddleware, createStart } from "@tanstack/react-start";
import { serverFnLoggingMiddleware } from "@/utils/activities"; import { serverFnLoggingMiddleware } from "@/utils/activities";
const csrfMiddleware = createCsrfMiddleware({
filter: (ctx) => ctx.handlerType === "serverFn",
});
// Global function middleware: every server fn (current and future) is audited // Global function middleware: every server fn (current and future) is audited
// without opting in at the definition site. // without opting in at the definition site.
export const startInstance = createStart(() => ({ export const startInstance = createStart(() => ({
requestMiddleware: [csrfMiddleware],
functionMiddleware: [serverFnLoggingMiddleware], functionMiddleware: [serverFnLoggingMiddleware],
})); }));