{"id":14812,"date":"2023-02-07T12:26:00","date_gmt":"2023-02-07T17:26:00","guid":{"rendered":"https:\/\/manage4.performancescoring.net\/kb\/?p=14812"},"modified":"2025-09-08T14:47:40","modified_gmt":"2025-09-08T19:47:40","slug":"fixing-refused-to-connect-error","status":"publish","type":"post","link":"https:\/\/securedb.io\/kb\/?p=14812","title":{"rendered":"Fixing &#8220;Refused to Connect&#8221; Error"},"content":{"rendered":"\n<p>When <a href=\"https:\/\/securedb.io\/kb\/?p=13407\">embedding websites<\/a> into your meetings, you may come across the error: &#8220;Source Refused to Connect.&#8221; What this error means is that the source website or web app (the one you&#8217;re trying to embed) does not have our website&#8217;s URL in their Content Security Policy (CSP). If you have access to the website&#8217;s <code>htaccess<\/code> configuration file, you can whitelist SecureDB to allow it to embed it into your meetings. Here&#8217;s how.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>In order for this to work at all, there are two prerequisites. <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The source URL must have a valid SSL\/TLS (HTTPS) and be served over that secure connection.<\/li>\n\n\n\n<li>You have to have access to the source website&#8217;s configuration file.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Apache &#8211; Add SecureDB to Content Security Policy Header<\/h2>\n\n\n\n<p>In Apache, there is just one line you need to add to the source website&#8217;s <code>.htaccess<\/code> file in order to whitelist the web application to display the source URL in an iFrame embedded in your meeting.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Connect to the source website&#8217;s files<\/li>\n\n\n\n<li>In the root directory, locate the hidden configuration file, <code>.htaccess<\/code> (usually in <code>\/public_html\/<\/code>)<\/li>\n\n\n\n<li>Save a backup of that file<\/li>\n\n\n\n<li>Add the following line of code OUTSIDE of any automatically-generated code in that file.<\/li>\n<\/ol>\n\n\n\n<p><pre>Header add Content-Security-Policy \"frame-ancestors https:\/\/*.securedb.io;\"<\/pre><\/p>\n\n\n\n<p>You may see things like # <code>php -- BEGIN cPanel-generated handler, do not edit<\/code> or # <code>BEGIN WordPress<\/code> in that file.  Be sure to add this line OUTSIDE of the beginning and ending of those auto-generated lines.  Otherwise, it may get overwritten. <\/p>\n\n\n\n<p>Refresh your website in a fresh browsing tab.  If everything works well there, return to your meeting and try to embed the source site again.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Nginx &#8211; Add LoopSpire to CSP Header<\/h2>\n\n\n\n<p>If you&#8217;re using Nginx, you&#8217;ll need to find the configuration file.  By default you&#8217;ll find it in \/usr\/local\/nginx\/conf , \/etc\/nginx , or \/usr\/local\/etc\/nginx.&nbsp; <\/p>\n\n\n\n<p>Inside that file, locate the &#8220;server{}&#8221; block and add the following.  <br><strong>NOTE<\/strong>: Nginx requires these directives to end in a semicolon.  That&#8217;s why you see two of them at the end.  <\/p>\n\n\n\n<pre>add_header Content-Security-Policy \"frame-ancestors 'https:\/\/*.securedb.io';\";<\/pre>\n\n\n\n<p>Restart your server, if required, and test if it&#8217;s working.  Then, return to your meeting and try to embed the source site again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When embedding websites into your meetings, you may come across the error: &#8220;Source Refused to Connect.&#8221; What this error means is that the source website or web app (the one [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":16073,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_helpful_status":1,"footnotes":""},"categories":[46],"tags":[39],"class_list":["post-14812","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-support","tag-embedded-items"],"wps_subtitle":"","_links":{"self":[{"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=\/wp\/v2\/posts\/14812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14812"}],"version-history":[{"count":3,"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=\/wp\/v2\/posts\/14812\/revisions"}],"predecessor-version":[{"id":19130,"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=\/wp\/v2\/posts\/14812\/revisions\/19130"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=\/wp\/v2\/media\/16073"}],"wp:attachment":[{"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/securedb.io\/kb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}