logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: ef16089c6d32d8d6619fea28838b83136fe3b0fd
parent: 4b4ea1f92935ee8b32ed50dc2f4f1d091f6276f2
Author: Yamagishi Kazutoshi <ykzts@desire.sh>
Date:   Mon, 24 Jul 2017 15:46:29 +0900

Redirect user profile page to short URL when HTML format (#4328)


Diffstat:

Mconfig/routes.rb2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/routes.rb b/config/routes.rb @@ -26,7 +26,7 @@ Rails.application.routes.draw do confirmations: 'auth/confirmations', } - get '/users/:username', to: redirect('/@%{username}'), constraints: lambda { |req| req.format.nil? } + get '/users/:username', to: redirect('/@%{username}'), constraints: lambda { |req| req.format.nil? || req.format.html? } resources :accounts, path: 'users', only: [:show], param: :username do resources :stream_entries, path: 'updates', only: [:show] do