{"id":1716,"date":"2016-11-08T18:34:18","date_gmt":"2016-11-08T17:34:18","guid":{"rendered":"https:\/\/blog.kodono.info\/wordpress\/?p=1716"},"modified":"2017-07-25T11:22:22","modified_gmt":"2017-07-25T09:22:22","slug":"disable-x-frame-options-on-sharepoint","status":"publish","type":"post","link":"https:\/\/blog.kodono.info\/wordpress\/2016\/11\/08\/disable-x-frame-options-on-sharepoint\/","title":{"rendered":"Disable X-Frame-Options on Sharepoint"},"content":{"rendered":"<p>I needed to communicate with an iframe on Sharepoint, however Sharepoint returned <code>Load denied by X-Frame-Options<\/code> &#8230; To override this limitation you have to create a Webpart page where you&#8217;ll add the code <code>&lt;WebPartPages:AllowFraming runat=\"server\" \/><\/code> into the <code>&lt;asp:Content><\/code> section (that might work somewhere else, but I did this way).<\/p>\n<p>You can also add it into your masterpage to allow it everywhere on your website. Add it into your <code>&lt;head><\/code> block:<br \/>\n<a href=\"https:\/\/blog.kodono.info\/wordpress\/wp-content\/uploads\/2016\/11\/masterpage_allow_ifram.png\" title=\"See full size image\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.kodono.info\/wordpress\/wp-content\/uploads\/2016\/11\/masterpage_allow_ifram-1024x319.png\" alt=\"\" width=\"1024\" height=\"319\" class=\"aligncenter size-large wp-image-1836\" srcset=\"https:\/\/blog.kodono.info\/wordpress\/wp-content\/uploads\/2016\/11\/masterpage_allow_ifram-1024x319.png 1024w, https:\/\/blog.kodono.info\/wordpress\/wp-content\/uploads\/2016\/11\/masterpage_allow_ifram-300x93.png 300w, https:\/\/blog.kodono.info\/wordpress\/wp-content\/uploads\/2016\/11\/masterpage_allow_ifram-768x239.png 768w, https:\/\/blog.kodono.info\/wordpress\/wp-content\/uploads\/2016\/11\/masterpage_allow_ifram.png 1672w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Now you can use <code>postMessage()<\/code> to communicate with your iframe.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to communicate with an iframe on Sharepoint, however Sharepoint returned Load denied by X-Frame-Options &#8230; To override this limitation you have to create a Webpart page where you&#8217;ll add the code &lt;WebPartPages:AllowFraming runat=&#8221;server&#8221; \/> into the &lt;asp:Content> section (that might work somewhere else, but I did this way). You can also add it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","hide_page_title":"","footnotes":""},"categories":[15,170,13,33],"tags":[153,152,158,117],"class_list":["post-1716","post","type-post","status-publish","format-standard","hentry","category-astuce","category-english","category-niveau-intermediaire","category-programmation","tag-astuce","tag-niveau-intermediaire","tag-programmation","tag-sharepoint"],"_links":{"self":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/1716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/comments?post=1716"}],"version-history":[{"count":3,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/1716\/revisions"}],"predecessor-version":[{"id":1838,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/1716\/revisions\/1838"}],"wp:attachment":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/media?parent=1716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/categories?post=1716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/tags?post=1716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}