Allow to show my wordpress site in an iframe on another site

4

Hello, I have a site in wordpress that would like to display one of the pages in an iframe on another site, is it possible to do this? At this time when doing the iframe on another page I get the following error:

"Refused to display ' link ' in a frame because it is set 'X-Frame-Options' to 'SAMEORIGIN' / p>

I do not know where to disable the X-Frame option.

Can someone give me a light?

Thank you

    
asked by anonymous 03.10.2016 / 11:24

1 answer

1

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 url-from-source-site

DENY: The page can not be displayed in a frame.

SAMEORIGIN: The page can be displayed in a frame but the source must 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 successfully display the content of another site in an iframe you must change the directive to:

ALLOW-FROM link

Probably the current option should be set to X-Frame-Options: SAMEORIGIN

This option can be configured on your web server or the header of the page where you want to display the iframe.

Examples:

Tag Header: x-frame-options: ALLOW-FROM url-source-site

Apache: add to httpd.conf: header always set x-frame-options "ALLOW-FROM url-from-site-source"

    
05.10.2016 / 05:51