Skip to content

Commit 0621caf

Browse files
committed
chore: update CSP, add speed insights
1 parent f07cffd commit 0621caf

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

apps/sim/app/layout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import type { Metadata, Viewport } from 'next'
2+
import { Analytics } from '@vercel/analytics/next'
3+
import { SpeedInsights } from '@vercel/speed-insights/next'
24
import { createLogger } from '@/lib/logs/console-logger'
35
import { TelemetryConsentDialog } from '@/app/telemetry-consent-dialog'
46
import './globals.css'
@@ -159,6 +161,8 @@ export default function RootLayout({ children }: { children: React.ReactNode })
159161
<ZoomPrevention />
160162
<TelemetryConsentDialog />
161163
{children}
164+
<SpeedInsights />
165+
<Analytics />
162166
</body>
163167
</html>
164168
)

apps/sim/next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const nextConfig: NextConfig = {
112112
},
113113
{
114114
key: 'Content-Security-Policy',
115-
value: `default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.google.com https://apis.google.com https://*.vercel-insights.com https://vercel.live https://*.vercel.live; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.googleusercontent.com https://*.google.com https://*.atlassian.com https://cdn.discordapp.com; media-src 'self' blob:; font-src 'self' https://fonts.gstatic.com; connect-src 'self' ${process.env.OLLAMA_HOST || 'http://localhost:11434'} https://*.googleapis.com https://*.amazonaws.com https://*.s3.amazonaws.com https://*.vercel-insights.com https://*.atlassian.com https://vercel.live https://*.vercel.live; frame-src https://drive.google.com https://*.google.com; frame-ancestors 'self'; form-action 'self'; base-uri 'self'; object-src 'none'`,
115+
value: `default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.google.com https://apis.google.com https://*.vercel-insights.com https://vercel.live https://*.vercel.live https://vercel.com https://*.vercel.app; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.googleusercontent.com https://*.google.com https://*.atlassian.com https://cdn.discordapp.com; media-src 'self' blob:; font-src 'self' https://fonts.gstatic.com; connect-src 'self' ${process.env.OLLAMA_HOST || 'http://localhost:11434'} https://*.googleapis.com https://*.amazonaws.com https://*.s3.amazonaws.com https://*.vercel-insights.com https://*.atlassian.com https://vercel.live https://*.vercel.live https://vercel.com https://*.vercel.app; frame-src https://drive.google.com https://*.google.com; frame-ancestors 'self'; form-action 'self'; base-uri 'self'; object-src 'none'`,
116116
},
117117
],
118118
},

package-lock.json

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@
2727
"overrides": {
2828
"react": "19.1.0",
2929
"react-dom": "19.1.0"
30+
},
31+
"dependencies": {
32+
"@vercel/analytics": "^1.5.0"
3033
}
3134
}

0 commit comments

Comments
 (0)