From 7acff00d616c05e1fb45a2b7576f7a55bd072257 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 4 Oct 2022 12:55:48 +0200 Subject: [PATCH] Support new video embed api format (fixes #709) --- 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: <>, })}