Multiple 'X-Frame-Options' headers with conflicting values ('ALLOW, DENY') encountered when loading page - ClickJacking Issue


Any Studio HTML Component would not load the HTML editor view due to a `X-Frame-Options: DENY` HTTP response header setting. The response header when loading the HTML editor had the following header values and the 'DENY' value was causing the page not to load properly. It seemed weird to have multiple `x-frame-options` value set to begin with since our production install of edx-platform was only returning one value.

# Response Header

# Javascript Console within Chrome Browser
Refused to display '…static/ef1065178a//js/vendor&ParentOrigin=' in a frame because it set 'X-Frame-Options' to 'deny'.



Follow these steps to resolve your issue. Additional information about X-Frame-Options can be found here

For the NGINX site in question make sure that you don't have multiple `add_header X-Frame-Options` values set unless needed.

  1. For this case we setup Let's Encrypt ( to configure our site out with SSL.
  2. Within the /edx/app/nginx/sites-available/cms configuration file we included a Let's Encrypt configuration reference at /etc/nginx/snippets/ssl-params.conf.
    1. This file included a call to add_header X-Frame-Options DENY; which we removed (by commenting out) to resolve our issue.
    2. By default edx-platform sets the middleware 'django.middleware.clickjacking.XFrameOptionsMiddleware' value for X_FRAME_OPTIONS = 'ALLOW' which won't restrict <frame>, <iframe>, or <objects> from rendering.

      For example:

      # Clickjacking protection can be enabled by setting this to 'DENY'
    3. Need to restart NGINX service for any updated configuration for the site to remove the additional `X-Frame-Option` header.

Details of this issue can be found here.