allow embedding
This commit is contained in:
parent
5dc32186e8
commit
7b9c6459e3
1 changed files with 8 additions and 0 deletions
|
@ -2,6 +2,7 @@ class ApplicationController < ActionController::Base
|
|||
protect_from_forgery
|
||||
|
||||
before_filter :get_invite_link
|
||||
after_action :allow_embedding
|
||||
|
||||
# this is for global login
|
||||
include ContentHelper
|
||||
|
@ -69,4 +70,11 @@ private
|
|||
safe_uri = (unsafe_uri.match(valid_url)) ? unsafe_uri : '//metamaps.cc/'
|
||||
@invite_link = "#{safe_uri}join" + (current_user ? "?code=#{current_user.code}" : "")
|
||||
end
|
||||
|
||||
def allow_embedding
|
||||
#allow all
|
||||
response.headers.except! 'X-Frame-Options'
|
||||
# or allow a whitelist
|
||||
# response.headers['X-Frame-Options'] = 'ALLOW-FROM http://blog.metamaps.cc'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue