<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>selfoss support forum - Content-Security-Policy</title>
<link>https://forum.selfoss.aditu.de/</link>
<description>selfoss support forum</description>
<language>en</language>
<item>
<title>Content-Security-Policy (reply)</title>
<content:encoded><![CDATA[<p><code>img-src *;</code> is therefore better for remote images in articles. I thought my selfoss had stopped working when I removed object-src but I've just (re)tried it and it seems fine.</p>
]]></content:encoded>
<link>https://forum.selfoss.aditu.de/index.php?id=1496</link>
<guid>https://forum.selfoss.aditu.de/index.php?id=1496</guid>
<pubDate>Thu, 11 May 2023 15:30:37 +0000</pubDate>
<dc:creator>nickrickard</dc:creator>
</item>
<item>
<title>Content-Security-Policy (reply)</title>
<content:encoded><![CDATA[<p>Thanks. Ideally we would have selfoss send the CSP headers by default but I have not gotten around to considering all the implications yet. We are tracking this in <a href="https://github.com/fossar/selfoss/issues/891">https://github.com/fossar/selfoss/issues/891</a>.</p>
<p>Main issue I see is that, we load images from the original sites (except for the thumbnails, which selfoss caches) by default so <code>image-src 'self'</code> will prevent them from loading. But it can be fine if you mostly read articles on the original sites, rather than directly in selfoss.</p>
<p>Also <code>object-src</code> can probably be removed (so it defaults to <code>none</code>).</p>
]]></content:encoded>
<link>https://forum.selfoss.aditu.de/index.php?id=1495</link>
<guid>https://forum.selfoss.aditu.de/index.php?id=1495</guid>
<pubDate>Thu, 11 May 2023 13:43:35 +0000</pubDate>
<dc:creator>jtojnar</dc:creator>
</item>
<item>
<title>Content-Security-Policy</title>
<content:encoded><![CDATA[<p>I'm sharing this to get feedback if I can improve it or to help others. I didn't see anything about it in the documentation. From a bit of testing, I think the minimal Content-Security-Policy header permissions required on the server to allow selfoss to run are:</p>
<p>add_header Content-Security-Policy &quot;default-src 'none'; base-uri 'self'; connect-src 'self'; font-src 'self'; img-src 'self'; object-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; upgrade-insecure-requests; block-all-mixed-content; frame-ancestors 'none';&quot; always;</p>
<p>(This is nginx syntax but you'll get the idea for Apache.)</p>
<p>Any thoughts, please? Maybe to add to the 'nginx configuration' wiki if it looks okay?</p>
]]></content:encoded>
<link>https://forum.selfoss.aditu.de/index.php?id=1494</link>
<guid>https://forum.selfoss.aditu.de/index.php?id=1494</guid>
<pubDate>Thu, 11 May 2023 07:54:59 +0000</pubDate>
<dc:creator>nickrickard</dc:creator>
</item>
</channel>
</rss>
