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();
});
<button
className="mt-2 btn btn-secondary text-monospace"
onClick={linkEvent(this, this.handleIframeExpand)}
- data-tippy-content={i18n.t("expand_here")}
>
- {this.state.expanded ? "-" : "+"}
+ {i18n.t("expand_here")}
</button>
)}
</div>
})}
{this.state.expanded &&
post.embed_video_url.match({
- some: html => (
- <div
- className="mt-3 mb-2"
- dangerouslySetInnerHTML={{ __html: html }}
- />
- ),
+ some: video_url => <iframe src={video_url}></iframe>,
none: <></>,
})}
</>