<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Site embedding (X-Frame-Options) partially broken since Cloudron 4.1.3]]></title><description><![CDATA[<p dir="auto">Since 4.1.3 I have a hard time embedding sites to Nextcloud when using the "External Sites" plugin.</p>
<p dir="auto">My domain is <a href="http://domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">domain.com</a> and the embedded site is <a href="http://sub.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">sub.domain.com</a>. For example it's working for Rocket.Chat but fails for Roundcube or Etherpad.</p>
<pre><code># Chromium 74
Refused to display 'sub.domain.com' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

# Firefox 67
Load denied by X-Frame-Options: sub.domain.com does not permit cross-origin framing.
</code></pre>
<p dir="auto"><em>curl -v <a href="http://domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">domain.com</a></em> says <em>&lt; x-frame-options: SAMEORIGIN</em> but I can't find this entry in any of the nginx config files. Does it come from PHP directly?</p>
<p dir="auto">I tried to set <em>proxy_hide_header X-Frame-Options;</em> without success. Then I went full crazy mode and  added add_header Content-Security-Policy 'frame-src <a href="https://sub.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">https://sub.domain.com</a>'; but it gets overwritten by the X-Frame-Options <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=13d69e59554" class="not-responsive emoji emoji-android emoji--disappointed" style="height:23px;width:auto;vertical-align:middle" title=":(" alt="😞" /></p>
<p dir="auto"><a href="https://docs.nextcloud.com/server/16/admin_manual/configuration_server/external_sites.html" target="_blank" rel="noopener noreferrer nofollow ugc">Nextcloud 16 Documentation --&gt; Linking external sites</a></p>
]]></description><link>https://forum.cloudron.io/topic/1813/site-embedding-x-frame-options-partially-broken-since-cloudron-4-1-3</link><generator>RSS for Node</generator><lastBuildDate>Wed, 17 Jun 2026 06:58:18 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/1813.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Jun 2019 03:34:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Site embedding (X-Frame-Options) partially broken since Cloudron 4.1.3 on Thu, 20 Jun 2019 21:32:41 GMT]]></title><description><![CDATA[<p dir="auto">Changed <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=13d69e59554" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> As it is the default configuration for Roundcube it is working like intended and we could leave it like this? I don't think its a rare use case but maybe it could be added to the documentation (which I always found very helpful).</p>
]]></description><link>https://forum.cloudron.io/post/3816</link><guid isPermaLink="true">https://forum.cloudron.io/post/3816</guid><dc:creator><![CDATA[subven]]></dc:creator><pubDate>Thu, 20 Jun 2019 21:32:41 GMT</pubDate></item><item><title><![CDATA[Reply to Site embedding (X-Frame-Options) partially broken since Cloudron 4.1.3 on Thu, 20 Jun 2019 20:22:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/subven" aria-label="Profile: subven">@<bdi>subven</bdi></a> For roundcube, you can set <code>$config['x_frame_options'] = false;</code> as per <a href="https://github.com/roundcube/roundcubemail/blob/f6807bcc4c60def86e82a6c36914f0d55af04a33/config/defaults.inc.php#L509" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/roundcube/roundcubemail/blob/f6807bcc4c60def86e82a6c36914f0d55af04a33/config/defaults.inc.php#L509</a></p>
<p dir="auto">For cloudron, you can set it in <code>/app/data/customconfig.php</code></p>
]]></description><link>https://forum.cloudron.io/post/3814</link><guid isPermaLink="true">https://forum.cloudron.io/post/3814</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Thu, 20 Jun 2019 20:22:55 GMT</pubDate></item><item><title><![CDATA[Reply to Site embedding (X-Frame-Options) partially broken since Cloudron 4.1.3 on Thu, 20 Jun 2019 03:19:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> the nginx configuration is fine and I have reloaded it correctly each time. I guess it's the app, maybe the apache2 inside the container. I'll dig a little deeper.</p>
<p dir="auto">Is someone able to reproduce <em>my</em> problem?</p>
<p dir="auto">Edit: It's not the apache2.</p>
<pre><code>root@9cff92f2-cf59-4a7e-9455-5261ee1fe533:/etc/apache2/conf-enabled# cat security.conf | grep sameorigin
#Header set X-Frame-Options: "sameorigin"
</code></pre>
<p dir="auto">OK I figured it out. <strong>It's the Roundcube app</strong> itself and it's a little bit sketchy. I do some research and update this post.<br />
Because I initially wrote that it's happening for roundcube AND etherpad...the mistake was on my side. I embedded etherpad from another domain what clearly could not work in this case. So it was just roundcube from the beginning.</p>
<p dir="auto">So the (temporary) fix for me is to add <strong>proxy_hide_header X-Frame-Options;</strong> to the roundcube app nginx config.</p>
<pre><code>root@v22019044939886250:/etc/nginx/applications# cat 211a9c92-26e4-456a-a28e-e6c550bf611b.conf | grep proxy
    proxy_hide_header X-XSS-Protection;
    proxy_hide_header X-Download-Options;
    proxy_hide_header X-Content-Type-Options;
    proxy_hide_header X-Permitted-Cross-Domain-Policies;
    proxy_hide_header Referrer-Policy;
    proxy_http_version 1.1;
    proxy_intercept_errors on;
    proxy_read_timeout       3500;
    proxy_connect_timeout    3250;
    proxy_set_header   Host               $host;
    proxy_set_header   X-Forwarded-For    $remote_addr;
    proxy_set_header   X-Forwarded-Host   $host;
    proxy_set_header   X-Forwarded-Port   $server_port;
    proxy_set_header   X-Forwarded-Proto  https;
    proxy_set_header   X-Forwarded-Ssl    on;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_hide_header X-Frame-Options;
    # only serve up the status page if we get proxy gateway errors
        # increase the proxy buffer sizes to not run into buffer issues (http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers)
        proxy_buffer_size       128k;
        proxy_buffers           4 256k;
        proxy_busy_buffers_size 256k;
        proxy_max_temp_file_size 0;
        proxy_pass http://127.0.0.1:46363;
</code></pre>
]]></description><link>https://forum.cloudron.io/post/3805</link><guid isPermaLink="true">https://forum.cloudron.io/post/3805</guid><dc:creator><![CDATA[subven]]></dc:creator><pubDate>Thu, 20 Jun 2019 03:19:10 GMT</pubDate></item><item><title><![CDATA[Reply to Site embedding (X-Frame-Options) partially broken since Cloudron 4.1.3 on Wed, 19 Jun 2019 17:55:16 GMT]]></title><description><![CDATA[<p dir="auto">FWIW, you can also restart nginx from System -&gt; Services.</p>
]]></description><link>https://forum.cloudron.io/post/3802</link><guid isPermaLink="true">https://forum.cloudron.io/post/3802</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 19 Jun 2019 17:55:16 GMT</pubDate></item><item><title><![CDATA[Reply to Site embedding (X-Frame-Options) partially broken since Cloudron 4.1.3 on Wed, 19 Jun 2019 17:54:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/subven" aria-label="Profile: subven">@<bdi>subven</bdi></a> said in <a href="/post/3796">Site embedding (X-Frame-Options) partially broken since Cloudron 4.1.3</a>:</p>
<blockquote>
<p dir="auto">curl -v <a href="http://domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">domain.com</a> says &lt; x-frame-options: SAMEORIGIN but I can't find this entry in any of the nginx config files. Does it come from PHP directly?</p>
</blockquote>
<p dir="auto">Indeed, this is the mystery. The Cloudron nginx config does not set these variables anymore (since they are obsolete) ie. we removed this in Cloudron 4.1.3. I am pretty sure it doesn't come from the app either. This can only mean that maybe the nginx on Cloudron is not "reloaded" with the latest configuration. Can you try <code>systemctl reload nginx</code> or <code>systemctl restart nginx</code> on Cloudron? Does curl then respond <em>without</em> the X-Frame-Options?</p>
]]></description><link>https://forum.cloudron.io/post/3801</link><guid isPermaLink="true">https://forum.cloudron.io/post/3801</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 19 Jun 2019 17:54:01 GMT</pubDate></item></channel></rss>