X-Frame options for remoting a pageX-Frame options for remoting a pagehttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=881692252024-03-29T02:33:23Z2024-03-29T02:33:23ZRE: X-Frame options for remoting a pageGianluca Bonettihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=882896252017-04-12T21:58:05Z2017-04-12T21:58:05Z<html><head></head><body><div class="quote-title">Samuel Kong:</div><blockquote>You have the wrong file. You should be looking at <a href="https://docs.liferay.com/portal/7.0/propertiesdoc/system.properties.html">system.properties</a> instead of portal.properties.</blockquote><br><br>Thank you Samuel, you rock!<br><br>I found in other threads on the community forum that it was to be set in portal-ext.properties, but it does not work.<br>I did like you pointed out and it worked like a charm.<br><br>More specifically, I added to ${liferay.home}/tomcat-8.0.32/webapps/ROOT/WEB-INF/classes/system-ext.properties the following lines<br><br><pre><code>http.header.secure.x.frame.options.1=/web/path/to/first/site
http.header.secure.x.frame.options.2=/web/path/to/second/site
</code></pre><br><br>Thank you very much!<br>Bye<br>Gianluca Bonetti</body></html>Gianluca Bonetti2017-04-12T21:58:05ZRE: X-Frame options for remoting a pageSamuel Konghttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=882073182017-04-11T03:01:15Z2017-04-11T03:01:15ZYou have the wrong file. You should be looking at <a href="https://docs.liferay.com/portal/7.0/propertiesdoc/system.properties.html">system.properties</a> instead of portal.properties.Samuel Kong2017-04-11T03:01:15ZX-Frame options for remoting a pageGianluca Bonettihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=881692242017-04-10T11:15:19Z2017-04-10T11:15:19ZHello everyone!<br /><br />I am quite new to Liferay, but I have already done some work and well, it works.<br /><br />What I cannot manage, is remoting a page to be embedded in an iframe on another site.<br />More specifically, the other site is done in Wordpress and should embed the Liferay page in an iframe.<br /><br />The browser does not display the iframe content and this is what I read in the browser console:<br />Refused to display '......' in a frame because it set 'X-Frame-Options' to 'sameorigin'<br /><br />Googling around, I found that I should put a property in ${liferay.home}/portal-ext.properties to allow that.<br />The property should be http.header.secure.x.frame.options.1=/path/to/page<br />Since this is a multi-site Liferay instance, I put http.header.secure.x.frame.options.1=/web/site1234<br /><br />Liferay loads correctly the property, I can see it has been loaded by:<br />Control Panel -> Server Administration -> Properties -> Portal Properties -> set filter "x.frame"<br /><br />Yet, it does not produce the desired effect, that is the page being displayied in an iframe on anothe