From 9efb4eddddc4b08e8738970289b61e6750d5511c Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 22 Aug 2018 17:37:51 +0200 Subject: [PATCH] Override CSP setting in the embed controller to allow frames --- app/controllers/statuses_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index bc711a8e42..cf750f4bb4 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -19,6 +19,10 @@ class StatusesController < ApplicationController before_action :set_referrer_policy_header, only: [:show] before_action :set_cache_headers + content_security_policy only: :embed do |p| + p.frame_ancestors(false) + end + def show respond_to do |format| format.html do