hietpasd
hietpasd

Reputation: 455

How do I override x-frame-options for entire Plone 5 site?

How do I change the "x-frame-options SAMEORIGIN" in Plone 5? It is now being set by plone.protect 3. I need the entire site, aka all the pages, to be loaded in via iframes for our online tutorial system.

We confirmed our apache is correct because we can load other plone 4 uwosh.edu sites into it. It is only happening on Plone 5.

I have already looked at:


Our Plone 5 Site: http://www.uwosh.edu/library

Broken Tutorial Site which uses iframes: http://polk2.uwosh.edu/library/gots/tutorial/abiinform-complete

Upvotes: 1

Views: 331

Answers (1)

fulv
fulv

Reputation: 1016

The github issue that you referenced has the answer, I believe: just set the environment variable PLONE_X_FRAME_OPTIONS to an empty string.

You can set this in your zope config file or in buildout, or both:

in buildout, I have:

environment-vars = ... PLONE_X_FRAME_OPTIONS ''

environment-vars is used both in plone.recipe.zeoserver and in plone.recipe.zope2instance.

In your zope conf files:

<environment> ... PLONE_X_FRAME_OPTIONS '' </environment>

Upvotes: 2

Related Questions