title: Disqus on an amp page inside an amp-iframe
body: <p>I try to implement Disqus on an amp document. My idea is to use an <a href="https://www.ampproject.org/docs/reference/extended/amp-iframe.html">amp-iframe</a>
  which loads a small document which only contains Disqus. I used this amp frame</p>
  
  <pre><code>&lt;amp-iframe width="300" height="300"
              layout="responsive"
              sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-scripts"
              resizable
              frameborder="0"
              seamless
              src="/disquss/name-of-blog-post"&gt;
      &lt;div overflow tabindex=0 role=button aria-label="Read more"&gt;more!&lt;/div&gt;
  &lt;/amp-iframe&gt;
  </code></pre>
  
  <p>However, chrome throws a content security policy violation:</p>
  
  <blockquote>
    <p>Refused to load the script
    '<a href="https://a.disquscdn.com/next/embed/lounge.load.f3e1717b71e7256da258d3a504e56865.js">https://a.disquscdn.com/next/embed/lounge.load.f3e1717b71e7256da258d3a504e56865.js</a>'
    because it violates the following Content Security Policy directive:
    "script-src https://<em>.twitter.com:</em>
    <a href="https://api.adsnative.com/v1/ad.json">https://api.adsnative.com/v1/ad.json</a> *.adsafeprotected.com
    <a href="https://cas.criteo.com/delivery/0.1/napi.jsonp">https://cas.criteo.com/delivery/0.1/napi.jsonp</a> <em>.services.disqus.com:</em>
    <a href="http://referrer.disqus.com/juggler/">http://referrer.disqus.com/juggler/</a> disqus.com http://<em>.twitter.com:</em>
    a.disquscdn.com <a href="https://referrer.disqus.com/juggler/">https://referrer.disqus.com/juggler/</a>
    https://<em>.services.disqus.com:</em> *.moatads.com 'unsafe-eval'
    <a href="https://mobile.adnxs.com/mob">https://mobile.adnxs.com/mob</a> <a href="https://ssl.google-analytics.com">https://ssl.google-analytics.com</a>".</p>
  </blockquote>
  
  <p>So basically, chrome does not load <code>https://a.disquscdn.com/next/embed/lounge.load.f3e1717b71e7256da258d3a504e56865.js</code> even though <code>a.disquscdn.com</code> is allowed. This restriction comes from an iframe disqus uses. This isn't a problem when I use a native sandboxed <code>&lt;iframe&gt;</code> instead of an <code>&lt;amp-iframe&gt;</code>.</p>
  
  <p>I'd liked to create an example but because of the iframe construct i can't simply create a jsfiddle.</p>