summaryrefslogtreecommitdiff
path: root/lib/api/api.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-05-31 08:01:56 +0000
committerDouwe Maan <douwe@gitlab.com>2018-05-31 08:01:56 +0000
commitee3b5923a55b94631fa31bb1e8c1a5d7774bda71 (patch)
tree2a37dc381d2a8fc2384fa80ceca5bd222603379e /lib/api/api.rb
parent5116d11a6192e469ba09103507b1e0cb8d777326 (diff)
parent4d3f7ae1ef5881869140f0c4a5865f65569db26a (diff)
downloadgitlab-ce-ee3b5923a55b94631fa31bb1e8c1a5d7774bda71.tar.gz
Merge branch 'fj-36819-remove-v3-api' into 'master'
Removal of API v3 from the codebase Closes #36819 See merge request gitlab-org/gitlab-ce!18970
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r--lib/api/api.rb44
1 files changed, 5 insertions, 39 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index 206fabe5c43..7ea575a9661 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -22,48 +22,14 @@ module API
allow_access_with_scope :api
prefix :api
- version %w(v3 v4), using: :path
-
version 'v3', using: :path do
- helpers ::API::V3::Helpers
- helpers ::API::Helpers::CommonHelpers
-
- mount ::API::V3::AwardEmoji
- mount ::API::V3::Boards
- mount ::API::V3::Branches
- mount ::API::V3::BroadcastMessages
- mount ::API::V3::Builds
- mount ::API::V3::Commits
- mount ::API::V3::DeployKeys
- mount ::API::V3::Environments
- mount ::API::V3::Files
- mount ::API::V3::Groups
- mount ::API::V3::Issues
- mount ::API::V3::Labels
- mount ::API::V3::Members
- mount ::API::V3::MergeRequestDiffs
- mount ::API::V3::MergeRequests
- mount ::API::V3::Notes
- mount ::API::V3::Pipelines
- mount ::API::V3::ProjectHooks
- mount ::API::V3::Milestones
- mount ::API::V3::Projects
- mount ::API::V3::ProjectSnippets
- mount ::API::V3::Repositories
- mount ::API::V3::Runners
- mount ::API::V3::Services
- mount ::API::V3::Settings
- mount ::API::V3::Snippets
- mount ::API::V3::Subscriptions
- mount ::API::V3::SystemHooks
- mount ::API::V3::Tags
- mount ::API::V3::Templates
- mount ::API::V3::Todos
- mount ::API::V3::Triggers
- mount ::API::V3::Users
- mount ::API::V3::Variables
+ route :any, '*path' do
+ error!('API V3 is no longer supported. Use API V4 instead.', 410)
+ end
end
+ version 'v4', using: :path
+
before do
header['X-Frame-Options'] = 'SAMEORIGIN'
header['X-Content-Type-Options'] = 'nosniff'