From 6d4076fdc674cd5f9002e908e082d6c1c9dd1b90 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 7 Oct 2014 20:48:26 +0200 Subject: [PATCH] Disallow POST to compare: does not create objects --- config/routes.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 2534153758b..9273499f196 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -212,7 +212,8 @@ Gitlab::Application.routes.draw do end end - match "/compare/:from...:to" => "compare#show", as: "compare", via: [:get, :post], constraints: {from: /.+/, to: /.+/} + get '/compare/:from...:to' => 'compare#show', :as => 'compare', + :constraints => {from: /.+/, to: /.+/} resources :snippets, constraints: {id: /\d+/} do member do -- GitLab