How to allow page loading in iframes on Messenger and Facebook domains

I use iframe to display the page on the facebook messenger website after the following article:

https://developers.facebook.com/docs/messenger-platform/webview/extensions#webview_on_web

I already whitewashed my domain, but now I want to allow the loading of these pages in an iframe. To do this, I need to set the HTTP header X-Frame-Options to allow my page in an iframe.

X-Frame-Options: ALLOW-FROM https://www.messenger.com/ 

My question is how and where to set this response header.

+5
source share

Source: https://habr.com/ru/post/1270758/


All Articles