From daaac3dfe8f466237acfd555b3d5f770f8735c10 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Tue, 4 Oct 2022 20:35:20 +0000 Subject: [PATCH] Support new video embed api format (fixes #709) (#817) --- src/server/index.tsx | 2 +- src/shared/components/post/metadata-card.tsx | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/server/index.tsx b/src/server/index.tsx index fbac4ee1..d4a73a1b 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -33,7 +33,7 @@ if (!process.env["LEMMY_UI_DISABLE_CSP"] && !process.env["LEMMY_UI_DEBUG"]) { server.use(function (_req, res, next) { res.setHeader( "Content-Security-Policy", - `default-src 'none'; connect-src *; img-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; form-action 'self'; base-uri 'self'` + `default-src 'none'; connect-src *; img-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; form-action 'self'; base-uri 'self'; frame-src *` ); next(); }); diff --git a/src/shared/components/post/metadata-card.tsx b/src/shared/components/post/metadata-card.tsx index 4dc68fdf..128742b1 100644 --- a/src/shared/components/post/metadata-card.tsx +++ b/src/shared/components/post/metadata-card.tsx @@ -76,9 +76,8 @@ export class MetadataCard extends Component< )} @@ -92,12 +91,7 @@ export class MetadataCard extends Component< })} {this.state.expanded && post.embed_video_url.match({ - some: html => ( -
- ), + some: video_url => , none: <>, })}