From: Nutomic Date: Tue, 4 Oct 2022 20:35:20 +0000 (+0000) Subject: Support new video embed api format (fixes #709) (#817) X-Git-Url: http://these/git/%22https:/image.com/%7B%60%24%7BghostArchiveUrl%7D/static/git-favicon.png?a=commitdiff_plain;h=daaac3dfe8f466237acfd555b3d5f770f8735c10;p=lemmy-ui.git Support new video embed api format (fixes #709) (#817) --- diff --git a/src/server/index.tsx b/src/server/index.tsx index fbac4ee..d4a73a1 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 4dc68fd..128742b 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: <>, })}