Problems with iframe and X-Frame-Options Header

Asked

Viewed 2,967 times

0

I was starting a simple project but when I will use the <iframe> there is a problem, the page problem which I am requesting does not appear.

I did a search on the subject and found some people talking about X-Frame-Options Header however I did not understand if this would solve my problem or would block external sites from 'ordering' my site as <iframe>, but I didn’t give up and tried to use <meta>, however I did not have the desired result.

Meta that I used

<meta http-equiv="X-FRAME-OPTIONS" content="DENY">
  • The X-FRAME-OPTIONS blocks the use of frames, if you WANT to use frames then remove it. If the same doesn’t appear the contents the problem may be anything, for example you are using //site.com/ on a protocol page file:/// or ssl problems, or in your html (typo). So if you don’t give details, you don’t have to reply. Read this link to understand how to create an example of the problem that others can reproduce so they can help you: HOW TO CREATE A MINIMUM, COMPLETE AND VERIFIABLE EXAMPLE - A good night friend!

  • I asked a question a little while ago about, see if it can help you. http://answall.com/questions/80969/refused-to-display-in-a-frame-because-it-set-x-frame-options-to-sameorigin

  • 1

    Just to fix the X-FRAME-OPTIONS with deny is that blocks frames.

1 answer

-1

I solved with the following configuration:

Add the line to the file referring to your domain: servor_name.com.conf

(APACHE2 server):

Header always set X-Frame-Options "ALLOWALL"

(NGINX server):

add_header X-Frame-Options "ALLOWALL";

Browser other questions tagged

You are not signed in. Login or sign up in order to post.