title: AMP Webpush Error: 'X-Frame-Options' to 'deny'
body: <p>So I'm trying to implement webpush notifications for an AMP page, following the official documentation:</p>
  
  <p><a href="https://amp.dev/documentation/components/amp-web-push" rel="nofollow noreferrer">https://amp.dev/documentation/components/amp-web-push</a></p>
  
  <p>But there is an issue when adding the <code>&lt;amp-web-push&gt;</code> component and specifying the <code>helper-iframe-url</code> that points to the <code>amp-web-push-helper-frame.html</code>, the one I've downloaded from the official page.</p>
  
  <p>When I open my AMP page in browser, there are an error in the console:</p>
  
  <blockquote>
    <p>Refused to display
    '<a href="https://mytestsite.com/test/amp/amp-web-push-helper-frame.html?parentOrigin=https://mytestsite.com" rel="nofollow noreferrer">https://mytestsite.com/test/amp/amp-web-push-helper-frame.html?parentOrigin=https://mytestsite.com</a>'
    in a frame because it set 'X-Frame-Options' to 'deny'.</p>
  </blockquote>
  
  <p>And regarding that, I cant interact with the service worker. I took a look at the official AMP demo and there's no <code>X-Frame-Options</code> header with  <code>deny</code> value.</p>
  
  <p>This is my HTML templates:</p>
  
  <p>AMP component:</p>
  
  <pre><code>&lt;amp-web-push
          id="amp-web-push"
          layout="nodisplay"
          helper-iframe-url="https://mytestsite.com/test/amp/amp-web-push-helper-frame.html"
          permission-dialog-url="https://mytestsite.com/test/amp/amp-web-push-permission-dialog.html"
          service-worker-url="https://mytestsite.com/test/amp/service-worker.js"&gt;
  &lt;/amp-web-push&gt;
  </code></pre>
  
  <p>AMP widget</p>
  
  <pre><code>    &lt;amp-web-push-widget visibility="unsubscribed" layout="fixed" width="245" height="45"&gt;
          &lt;!-- Custom banner goes here... --&gt;
      &lt;/amp-web-push-widget&gt;
  </code></pre>
  
  <p>So I spent the whole day searching for solution and refactoring but still with the problem.</p>