Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to handle X-frame-Options response header?

Not applicable

I want to open DeveloperPortal from External resource or Html using Iframe tag.

When we try to open a developer portal in this way, the browser is giving me an error, as in dev-issue image, attached here.

The browser shows as X-Frame-options set as "Same origin" and hence the browser will not display it in an iframe, cross origin.

dev-issue.pngdev-issue1.png

Solved Solved
1 8 3,517
1 ACCEPTED SOLUTION

By default, Drupal v7 emits the X-Frame-Options header to prevent clickjacking.

You can change this behavior. For information on how, see here, and look for "How to override the default behavior."

Maybe you wish to use ALLOW-FROM with the url of the site that will embed the drupal site in the iframe.

Just curious: why force the portal to show up in an iframe?

View solution in original post

8 REPLIES 8