fix: 🔒 Allow all origins in form-action CSP

This commit is contained in:
Jesse Wierzbinski 2024-06-11 09:58:18 -10:00
parent e6650b6da4
commit 8f192a40ed
No known key found for this signature in database

View file

@ -36,8 +36,9 @@ export default defineNuxtConfig({
contentSecurityPolicy: {
"img-src": ["'self'", "data:", "https:", "blob:"],
"script-src": ["'nonce-{{nonce}}'", "'strict-dynamic'"],
// Add https because of some browsers blocking form-action to 'self' if the page is from a redirect
"form-action": ["'self'", "https:", "tuba:"],
// Allow all origins for form-action, so that clients registering custom
// protocol handlers will work (native clients for example)
"form-action": ["*"],
"media-src": ["'self'", "https:", "blob:"],
},
crossOriginResourcePolicy: "cross-origin",