diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 06:07:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 06:07:51 +0000 |
commit | 00bd11b166a886742f04d38c0d2551e52ff51472 (patch) | |
tree | af0b118c5748fdaabda2f9c2a007969c1673d581 /app/controllers/application_controller.rb | |
parent | a0c1ba61c8e8c9195e3ad4deefc5c4cb5c6a1501 (diff) | |
download | gitlab-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.rb | 3 |
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 |