Redirect user profile page to short URL when HTML format (#4328)
parent
9be9227c38
commit
c946795bc3
|
@ -26,7 +26,7 @@ Rails.application.routes.draw do
|
||||||
confirmations: 'auth/confirmations',
|
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 :accounts, path: 'users', only: [:show], param: :username do
|
||||||
resources :stream_entries, path: 'updates', only: [:show] do
|
resources :stream_entries, path: 'updates', only: [:show] do
|
||||||
|
|
Loading…
Reference in New Issue