Added fluid skills support

This commit is contained in:
2026-10-14 11:05:57 +02:00
parent 54c2d64cce
commit 0f073b963e
32 changed files with 280 additions and 42 deletions
+3 -3
View File
@@ -76,7 +76,8 @@ export function buildCsp(args: BuildCspArgs = {}): { key: string; value: string
'object-src': ["'none'"], // block <object>/<embed> (Flash-era attack surface)
}
if (r2Url) {src['img-src'].push(r2Url)}
// Site-relative R2_PUBLIC_URL ('/media', dev) is same-origin — already covered by 'self'.
if (r2Url && /^https?:\/\//i.test(r2Url)) {src['img-src'].push(r2Url)}
if (turnstile) {
src['script-src'].push('https://challenges.cloudflare.com')
@@ -110,7 +111,6 @@ export function buildCsp(args: BuildCspArgs = {}): { key: string; value: string
.map(([dir, values]) => `${dir} ${values.join(' ')}`)
.join('; ')
const key =
mode === 'report-only' ? 'Content-Security-Policy-Report-Only' : 'Content-Security-Policy'
const key = mode === 'report-only' ? 'Content-Security-Policy-Report-Only' : 'Content-Security-Policy'
return { key, value }
}