summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/routes.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index b1aeb686752..03b4a32a9dd 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -332,7 +332,7 @@ Gitlab::Application.routes.draw do
get(
'/commits/*id',
to: 'commits#show',
- constraints: { id: /.+/, format: /(html|js)/ },
+ constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ },
as: :commits
)
end
@@ -342,7 +342,6 @@ Gitlab::Application.routes.draw do
get :branches, on: :member
end
- resources :commits, only: [:show], constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ }
resources :compare, only: [:index, :create]
resources :network, only: [:show], constraints: { id: /(?:[^.]|\.(?!json$))+/, format: /json/ }