X-Frame-Options
X-Frame-Options is used to tell the browser whether or not it is authorized to process a page in a frame, iframe, or Object.
The three possible directives for X-Frame-Options are:
- X-Frame-Options: DENY
- X-Frame-Options: SAMEORIGIN
- X-Frame-Options: ALLOW-FROM-the-site-origin url
DENY: Page cannot be displayed in a frame.
SAMEORIGIN: The page can be displayed in a frame but the origin should be the site itself.
ALLOW-FROM Uri: The page can be displayed in a frame if the source is specified.
Anyway, in order for you to succeed in displaying the content of another site in an iframe you must change the directive to:
ALLOW-FROM https://meusite.pt/pagina_a_ser_renderizada
Probably the current option should be set to X-Frame-Options: SAMEORIGIN
This option can be set on your web server or in the header of the page where you want to display or not iframe.
Examples:
Tag Header: x-frame-options: ALLOW-FROM url-do-site-origin
Apache: add to httpd.conf: header Always set x-frame-options "ALLOW-FROM url-do-site-origin"
can you say why you use iframe ? why not redirect to the page you want to display?
– Luís Almeida