Centralize definition of the content security policy and add in-app chat

- in-app chat is meant for support requests and currently is only in the settings page, where users are most likely to go if confused IMO
This commit is contained in:
sabaimran
2024-12-08 17:57:27 -08:00
parent 0b87c13f8d
commit df66fb23ab
9 changed files with 78 additions and 63 deletions

View File

@@ -0,0 +1,16 @@
export function ContentSecurityPolicy() {
return (
<meta
httpEquiv="Content-Security-Policy"
content="default-src 'self' https://assets.khoj.dev;
media-src * blob:;
script-src 'self' https://assets.khoj.dev https://app.chatwoot.com 'unsafe-inline' 'unsafe-eval';
connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110;
style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com;
img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com;
font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com;
child-src 'self' https://app.chatwoot.com;
object-src 'none';"
></meta>
);
}