Skip to content

Commit e7bb87b

Browse files
varshavaradarajanketan
authored andcommitted
Added custom header for backups api (#2526)
1 parent a7854a9 commit e7bb87b

File tree

1 file changed

+1
-1
lines changed
  • server/webapp/WEB-INF/rails.new/config

1 file changed

+1
-1
lines changed

server/webapp/WEB-INF/rails.new/config/routes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218

219219
scope :api, as: :apiv1, format: false do
220220
api_version(:module => 'ApiV1', header: {name: 'Accept', value: 'application/vnd.go.cd.v1+json'}) do
221-
resources :backups, only: [:create]
221+
resources :backups, only: [:create], constraints: HeaderConstraint.new
222222

223223
resources :users, param: :login_name, only: [:create, :index, :show, :destroy], constraints: {login_name: /(.*?)/} do
224224
patch :update, on: :member

0 commit comments

Comments
 (0)