mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-25 12:34:58 +01:00
Fix paths with url-encoded @ to redirect to the correct path (#23593)
This commit is contained in:
parent
3f2e31800e
commit
40ae8d5e03
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user