Remove koa import from backend core

This commit is contained in:
Andrew Kingston 2025-04-08 10:40:24 +01:00
parent 95e3f17d8f
commit a8779d62d6
No known key found for this signature in database
1 changed files with 1 additions and 2 deletions

View File

@ -1,7 +1,6 @@
import crypto from "crypto"
import { app } from "../cache"
import { Feature, Ctx } from "@budibase/types"
import { Next } from "koa"
const CSP_DIRECTIVES = {
"default-src": ["'self'"],
@ -89,7 +88,7 @@ const CSP_DIRECTIVES = {
"worker-src": ["blob:"],
}
export async function contentSecurityPolicy(ctx: Ctx, next: Next) {
export async function contentSecurityPolicy(ctx: Ctx, next: any) {
const nonce = crypto.randomBytes(16).toString("base64")
ctx.state.nonce = nonce
let directives = { ...CSP_DIRECTIVES }