summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-05 06:07:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-05 06:07:51 +0000
commit00bd11b166a886742f04d38c0d2551e52ff51472 (patch)
treeaf0b118c5748fdaabda2f9c2a007969c1673d581 /app/controllers/application_controller.rb
parenta0c1ba61c8e8c9195e3ad4deefc5c4cb5c6a1501 (diff)
downloadgitlab-ce-00bd11b166a886742f04d38c0d2551e52ff51472.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 5a2eb2337aa..484e86964f6 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -26,6 +26,7 @@ class ApplicationController < ActionController::Base
before_action :ldap_security_check
around_action :sentry_context
before_action :default_headers
+ before_action :default_cache_headers
before_action :add_gon_variables, if: :html_request?
before_action :configure_permitted_parameters, if: :devise_controller?
before_action :require_email, unless: :devise_controller?
@@ -259,7 +260,9 @@ class ApplicationController < ActionController::Base
headers['X-XSS-Protection'] = '1; mode=block'
headers['X-UA-Compatible'] = 'IE=edge'
headers['X-Content-Type-Options'] = 'nosniff'
+ end
+ def default_cache_headers
if current_user
headers['Cache-Control'] = default_cache_control
headers['Pragma'] = 'no-cache' # HTTP 1.0 compatibility