mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-25 07:05:20 +00:00
Redirect user profile page to short URL when HTML format (#4328)
This commit is contained in:
parent
4b4ea1f929
commit
ef16089c6d
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue