From e483176006923aad12e5a30c43022071b5608f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 1 Jun 2015 00:03:41 +0200 Subject: [PATCH] no need for redundant extension parameter --- config/routes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 201dd6dd931..86ceb31d2ed 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -293,9 +293,9 @@ Discourse::Application.routes.draw do # used to download original images get "uploads/:site/:sha" => "uploads#show", constraints: { site: /\w+/, sha: /[a-f0-9]{40}/ } # used to dowwload attachments - get "uploads/:site/original/:tree/:sha:extension" => "uploads#show", constraints: { site: /\w+/, sha: /[a-f0-9]{40}/, extension: /\.\w{2,}/ } + get "uploads/:site/original/:tree:sha" => "uploads#show", constraints: { site: /\w+/, tree: /(\w+\/)+/i, sha: /[a-f0-9]{40}/ } # used to download attachments (old route) - get "uploads/:site/:id/:sha:extension" => "uploads#show", constraints: { site: /\w+/, id: /\d+/, sha: /[a-f0-9]{16}/, extension: /\.\w{2,}/ } + get "uploads/:site/:id/:sha" => "uploads#show", constraints: { site: /\w+/, id: /\d+/, sha: /[a-f0-9]{16}/ } get "posts" => "posts#latest" get "posts/by_number/:topic_id/:post_number" => "posts#by_number"