Dont allow gitlab be loaded in iframe
This commit is contained in:
parent
fac503877d
commit
85de55a120
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@ class ApplicationController < ActionController::Base
|
||||||
before_filter :set_current_user_for_observers
|
before_filter :set_current_user_for_observers
|
||||||
before_filter :add_abilities
|
before_filter :add_abilities
|
||||||
before_filter :dev_tools if Rails.env == 'development'
|
before_filter :dev_tools if Rails.env == 'development'
|
||||||
|
before_filter :default_headers
|
||||||
|
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
|
|
||||||
|
@ -148,4 +149,8 @@ class ApplicationController < ActionController::Base
|
||||||
Rack::MiniProfiler.authorize_request
|
Rack::MiniProfiler.authorize_request
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def default_headers
|
||||||
|
headers['X-Frame-Options'] = 'DENY'
|
||||||
|
headers['X-XSS-Protection'] = '1; mode=block'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue