Fix paths with url-encoded @ to redirect to the correct path (#23593)
parent
66f715550e
commit
d15a9df6fe
|
@ -110,6 +110,8 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
resource :inbox, only: [:create], module: :activitypub
|
resource :inbox, only: [:create], module: :activitypub
|
||||||
|
|
||||||
|
get '/:encoded_at(*path)', to: redirect("/@%{path}"), constraints: { encoded_at: /%40/ }
|
||||||
|
|
||||||
constraints(username: /[^@\/.]+/) do
|
constraints(username: /[^@\/.]+/) do
|
||||||
get '/@:username', to: 'accounts#show', as: :short_account
|
get '/@:username', to: 'accounts#show', as: :short_account
|
||||||
get '/@:username/with_replies', to: 'accounts#show', as: :short_account_with_replies
|
get '/@:username/with_replies', to: 'accounts#show', as: :short_account_with_replies
|
||||||
|
|
Reference in New Issue