{"id":1629,"date":"2018-10-22T16:28:36","date_gmt":"2018-10-22T20:28:36","guid":{"rendered":"http:\/\/www.xavignu.com\/?p=1629"},"modified":"2018-10-22T16:28:36","modified_gmt":"2018-10-22T20:28:36","slug":"allow-iframe-in-nginx","status":"publish","type":"post","link":"https:\/\/www.xavignu.com\/?p=1629","title":{"rendered":"Allow IFrame in nginx"},"content":{"rendered":"<p>So the other day while working on this <a href=\"https:\/\/www.xavignu.com\/?p=1618\" target=\"_blank\">post<\/a> I faced the issue that the map wasn&#8217;t showing as an <a href=\"https:\/\/www.w3schools.com\/tags\/tag_iframe.asp\" target=\"_blank\">IFrame<\/a>, it was showing nothing but and empty white rectangle. This because by default <a href=\"https:\/\/nginx.org\/en\/\" target=\"_blank\">nginx<\/a> doesn&#8217;t allow X-Frames. In order to do this it is needed to edit file \/etc\/nginx\/snippets\/ssl-params.conf and change DENY to SAMEORIGIN as below:<\/p>\n<pre id=\"terminal\">grep \"SAMEORI\" \/etc\/nginx\/snippets\/ssl-params.conf \r\nadd_header X-Frame-Options SAMEORIGIN;\r\n<\/pre>\n<p>References:<br \/>\n1) <a href=\"https:\/\/nginx.org\/\" target=\"_blank\">Nginx web<\/a><br \/>\n2) <a href=\"https:\/\/geekflare.com\/add-x-frame-options-nginx\/\" target=\"_blank\">geekflare.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So the other day while working on this post I faced the issue that the map wasn&#8217;t showing as an IFrame, it was showing nothing but and empty white rectangle. This because by default nginx doesn&#8217;t allow X-Frames. In order to do this it is needed to edit file \/etc\/nginx\/snippets\/ssl-params.conf and change DENY to SAMEORIGIN [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[92],"tags":[91,100],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/pTQgt-qh","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/1629"}],"collection":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1629"}],"version-history":[{"count":3,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/1629\/revisions"}],"predecessor-version":[{"id":1632,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/1629\/revisions\/1632"}],"wp:attachment":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}