Created
March 15, 2013 16:32
Facebook page and canvas apps with Rails 4, can lead to a blank white page. In Rails 4, the X-Frame-Options are sets by default, and you should override them, to allow iframes in Rails.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FacebookClubsController < ApplicationController | |
layout "facebook_canvas" | |
after_filter :allow_iframe | |
def index | |
end | |
private | |
def allow_iframe | |
response.headers["X-Frame-Options"] = "GOFORIT" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note:
It is probably a bit safer to whitelist to the facebook domain using: