diff options
author | Rémy Coutable <remy@rymai.me> | 2018-02-05 10:04:43 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-02-05 10:04:43 +0000 |
commit | 4d64524b0dc26dadc58a01a1696d2198a05e21ee (patch) | |
tree | 930429bd79aee23ea3199c9fd146b83551ebdec4 /app/controllers/projects_controller.rb | |
parent | 9f5537304bf30bbe7430cc0290df3acea035a428 (diff) | |
parent | cca61980d5ad9c4db65b9498fe49d936657bc0e2 (diff) | |
download | gitlab-ce-4d64524b0dc26dadc58a01a1696d2198a05e21ee.tar.gz |
Merge branch 'query-counts' into 'master'
Track and act upon the number of executed SQL queries
See merge request gitlab-org/gitlab-ce!16466
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 86923909d07..72573e0765d 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -3,6 +3,7 @@ class ProjectsController < Projects::ApplicationController include ExtractsPath include PreviewMarkdown + before_action :whitelist_query_limiting, only: [:create] before_action :authenticate_user!, except: [:index, :show, :activity, :refs] before_action :redirect_git_extension, only: [:show] before_action :project, except: [:index, :new, :create] @@ -405,4 +406,8 @@ class ProjectsController < Projects::ApplicationController # redirect_to request.original_url.sub(%r{\.git/?\Z}, '') if params[:format] == 'git' end + + def whitelist_query_limiting + Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/42440') + end end |