Skip to content

Commit 6f6b55f

Browse files
committed
web: fix CSP blocking fonts/video, replace YouTube embed with local MP4
CSP (next.config.mjs): - style-src: add https://rsms.me (Inter font CSS loaded in layout.tsx) - font-src: add https://rsms.me (Inter font files) - media-src: add 'self' (local video playback) - connect-src: add API domains for dashboard fetch calls Hero video: - Replace HeroVideoDialog YouTube iframe with native <video> element playing /assets/demo-video.mp4 (autoplay, loop, muted, playsInline) - Eliminates the frame-src CSP violation entirely — no iframe needed - Removes unused HeroVideoDialog import Blog author: - /author.jpg didn't exist — temporarily use /logo-small.png as avatar until the real headshot is provided
1 parent 7b0b5a0 commit 6f6b55f

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

apps/web/next.config.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ const nextConfig = {
2121
value: [
2222
"default-src 'self'",
2323
"script-src 'self' 'unsafe-inline' 'unsafe-eval'",
24-
"style-src 'self' 'unsafe-inline'",
24+
"style-src 'self' 'unsafe-inline' https://rsms.me",
2525
"img-src 'self' data: blob: https://randomuser.me",
26-
"font-src 'self' data:",
27-
"connect-src 'self' ws: wss:",
26+
"font-src 'self' data: https://rsms.me",
27+
"media-src 'self'",
28+
"connect-src 'self' ws: wss: https://api.all-source.xyz https://allsource-query.fly.dev",
2829
"frame-ancestors 'none'",
2930
"base-uri 'self'",
3031
"form-action 'self'",

apps/web/src/app/(marketing)/blog/[slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default async function Blog({ params }: { params: Promise<{ slug: string
104104
<Author
105105
twitterUsername={post.metadata.author}
106106
name={post.metadata.author}
107-
image={"/author.jpg"}
107+
image={"/logo-small.png"}
108108
/>
109109
</div>
110110
<article

apps/web/src/components/sections/hero.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { buttonVariants, cn, HeroVideoDialog, Icons } from "@allsource/ui";
3+
import { buttonVariants, cn, Icons } from "@allsource/ui";
44
import { motion } from "motion/react";
55
import Link from "next/link";
66
import { useEffect, useRef, useState } from "react";
@@ -273,11 +273,13 @@ function HeroImage() {
273273
{/* Hover glow intensification */}
274274
<div className="absolute -inset-4 rounded-2xl bg-gradient-to-r from-primary/20 via-purple-500/10 to-primary/20 blur-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500" />
275275

276-
<HeroVideoDialog
277-
animationStyle="from-center"
278-
videoSrc="https://www.youtube.com/embed/qh3NGpYRG3I?si=4rb-zSdDkVK9qxxb"
279-
thumbnailSrc="/assets/hero-screenshot.png"
280-
thumbnailAlt="AllSource Dashboard — Event Explorer with real-time metrics"
276+
<video
277+
src="/assets/demo-video.mp4"
278+
poster="/assets/hero-screenshot.png"
279+
autoPlay
280+
loop
281+
muted
282+
playsInline
281283
className="relative border rounded-lg shadow-lg shadow-primary/10 max-w-screen-lg transition-shadow duration-500 group-hover:shadow-xl group-hover:shadow-primary/20"
282284
/>
283285
</div>

0 commit comments

Comments
 (0)