diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /lib/gitlab/middleware | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'lib/gitlab/middleware')
-rw-r--r-- | lib/gitlab/middleware/read_only/controller.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/gitlab/middleware/read_only/controller.rb b/lib/gitlab/middleware/read_only/controller.rb index 69e2ae55cb0..09a813fa4c3 100644 --- a/lib/gitlab/middleware/read_only/controller.rb +++ b/lib/gitlab/middleware/read_only/controller.rb @@ -4,26 +4,26 @@ module Gitlab module Middleware class ReadOnly class Controller - DISALLOWED_METHODS = %w(POST PATCH PUT DELETE).freeze + DISALLOWED_METHODS = %w[POST PATCH PUT DELETE].freeze APPLICATION_JSON = 'application/json' - APPLICATION_JSON_TYPES = %W{#{APPLICATION_JSON} application/vnd.git-lfs+json}.freeze + APPLICATION_JSON_TYPES = %W[#{APPLICATION_JSON} application/vnd.git-lfs+json].freeze ERROR_MESSAGE = 'You cannot perform write operations on a read-only instance' ALLOWLISTED_GIT_READ_ONLY_ROUTES = { - 'repositories/git_http' => %w{git_upload_pack} + 'repositories/git_http' => %w[git_upload_pack] }.freeze ALLOWLISTED_GIT_LFS_BATCH_ROUTES = { - 'repositories/lfs_api' => %w{batch} + 'repositories/lfs_api' => %w[batch] }.freeze ALLOWLISTED_GIT_REVISION_ROUTES = { - 'projects/compare' => %w{create} + 'projects/compare' => %w[create] }.freeze ALLOWLISTED_SESSION_ROUTES = { - 'sessions' => %w{destroy}, - 'admin/sessions' => %w{create destroy} + 'sessions' => %w[destroy], + 'admin/sessions' => %w[create destroy] }.freeze GRAPHQL_URL = '/api/graphql' |