I am trying to implement a simple Sharepoint 2013 Online solution to allow sharepoint to render an external source inside an iframe, the external source in this case is OWA. Placing a simple page renderer does not work because SHAREPOINT does not allow this because it sets the X-Frame-Options 'to' SAMEORIGIN. So I am trying to get around it with simple Javascript in order to modify the HttpHeader sent to the server. This is my code:
<HTML>
<head>
<script>
var xhr = new XMLHttpRequest();
xhr.open("get", "https://xxx.sharepoint.com/sites/dw-local/luca-pappallardo/SitePages/OWAgsfn.aspx", true);
xhr.onload = function(){
xhr.setRequestHeader("X-FRAME-OPTION", "ALLOWALL");
};
xhr.send(null);
</script>
</head>
<body>
<iframe src="https://outlook.office365.com/owa"></iframe>
</body>
</html>
But I still have an error, in the specific case the following:
'https://portal.office.com/SuiteServiceProxy.aspx?exsvurl=1&realm=office365.com&Silent=1' , "X-Frame-Options" "SAMEORIGIN".
- , ? , , , . , - script? .