How to enable X-Frame options in Liferay CE 7.4 for an specific URL - Embed a Liferay page in another Domain

64 Views Asked by At

I want to embed a page from my Liferay portal into another website using an iFrame, but I am getting this error:

Refused to display '<DOMAIN>/regional-resources' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

I did a research and there is a property that was used to enable this functionality (Liferay 7.4 doc):

  • http.header.secure.x.frame.options=true
  • http.header.secure.x.frame.options.1=/regional-resources
  • http.header.secure.x.frame.options.255=/|SAMEORIGIN

I tried it out but I got this error:

ERROR [main][VerifyProperties:47] Stopping the server due to incorrect use of migrated portal properties [http.header.secure.x.frame.options, http.header.secure.x.frame.options.255]

I can not find another documentation about this property, maybe I need to set it as an OSGI configuration file but not sure how.

0

There are 0 best solutions below