We have a website integrated with SharePoint online and we are using WopiFrame.aspx page for previewing documents uploaded to the Sharepoint library. The iframe has the following url: https:///_layouts/15/WopiFrame2.aspx?sourcedoc=Documents%2fpdf-sample.pdf&file=pdf-sample.pdf&action=interactivepreview.
The page looks great and shows the data we want. However, users are not able to download the file (for example PDF) when clicking on the "Download a Copy" button. They receive a network error (blocked by response side)
It is clear that the problem is because WopiFrame.aspx page is configured with X-FRAME-OPTIONS set to SAMEORIGIN.
Is there a workaround? Or maybe there is a way to show the document without this menu?