diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-05-15 15:39:33 +0200 |
---|---|---|
committer | Francisco Javier López <fjlopez@gitlab.com> | 2018-05-30 18:23:07 +0200 |
commit | 4d3f7ae1ef5881869140f0c4a5865f65569db26a (patch) | |
tree | 4d1cf8339ad9d8d9dc9a0176b90827e84ef3aaf2 /lib/api/api.rb | |
parent | 439adb96dadd49124d080db0db0b0076d2049c6b (diff) | |
download | gitlab-ce-4d3f7ae1ef5881869140f0c4a5865f65569db26a.tar.gz |
Removed API endpoint and specsfj-36819-remove-v3-api
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r-- | lib/api/api.rb | 44 |
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' |