
Hi @Flórida da Graça Botelho Araújo,
According to your description, unfortunately I cannot reproduce your problem. I want to confirm if you use and develop it in SharePoint?
Based on this error message: Refused to display 'https://xpto.pt/' in a frame because it set 'X-Frame-Options' to 'sameorigin''.
Please try to do some troubleshooting:
- Please make sure you are using
embedded=true
while adding source in the iframe. For example:
<iframe class="xpto" src="https://xpto.pt/&embedded=true"></iframe>
2.If your application have web.config
then add the following tag in web.config:
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="ALLOW" />
</customHeaders>
</httpProtocol>
</system.webServer>
This will allow application to append iframe from other origin also. You can also use the following value for X-Frame-Option :
X-FRAME-OPTIONS: ALLOW-FROM https://example.com/
Similar issue for reference:
Refused to display ‘url’ in a frame because it set ‘X-Frame-Options’ to ‘SAMEORIGIN’
How to fix Refused to display in a frame because it set 'X-Frame-Options' to 'sameorigin
Hope it can help you. Thanks for your understanding.
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.