Dont allow gitlab be loaded in iframe

This commit is contained in:
Dmitriy Zaporozhets 2013-02-02 20:32:13 +02:00
parent fac503877d
commit 85de55a120

View file

@ -4,6 +4,7 @@ class ApplicationController < ActionController::Base
before_filter :set_current_user_for_observers
before_filter :add_abilities
before_filter :dev_tools if Rails.env == 'development'
before_filter :default_headers
protect_from_forgery
@ -148,4 +149,8 @@ class ApplicationController < ActionController::Base
Rack::MiniProfiler.authorize_request
end
def default_headers
headers['X-Frame-Options'] = 'DENY'
headers['X-XSS-Protection'] = '1; mode=block'
end
end