summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-12-10 03:10:01 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-12-10 03:10:01 +0000
commitf9317c6ad25735ecff6ed7dd474b9cddd930c603 (patch)
tree1d9a6dd91473674998c1995c341a51176757d80e /app/controllers/application_controller.rb
parent1b47b087e6c36f8dc38162d7712f01173c7b85cf (diff)
downloadgitlab-ce-f9317c6ad25735ecff6ed7dd474b9cddd930c603.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.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 3af1afab06e..976a9fa5038 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -66,10 +66,6 @@ class ApplicationController < ActionController::Base
:manifest_import_enabled?, :phabricator_import_enabled?,
:masked_page_url
- # Adds `no-store` to the DEFAULT_CACHE_CONTROL, to prevent security
- # concerns due to caching private data.
- DEFAULT_GITLAB_CACHE_CONTROL = "#{ActionDispatch::Http::Cache::Response::DEFAULT_CACHE_CONTROL}, no-store"
-
def self.endpoint_id_for_action(action_name)
"#{self.name}##{action_name}"
end
@@ -283,10 +279,7 @@ class ApplicationController < ActionController::Base
end
def default_cache_headers
- if current_user
- headers['Cache-Control'] = default_cache_control
- headers['Pragma'] = 'no-cache' # HTTP 1.0 compatibility
- end
+ headers['Pragma'] = 'no-cache' # HTTP 1.0 compatibility
end
def stream_csv_headers(csv_filename)
@@ -297,14 +290,6 @@ class ApplicationController < ActionController::Base
headers['Content-Disposition'] = "attachment; filename=\"#{csv_filename}\""
end
- def default_cache_control
- if request.xhr?
- ActionDispatch::Http::Cache::Response::DEFAULT_CACHE_CONTROL
- else
- DEFAULT_GITLAB_CACHE_CONTROL
- end
- end
-
def validate_user_service_ticket!
return unless signed_in? && session[:service_tickets]