Skip to content

Commit

Permalink
Fix paths with url-encoded @ to redirect to the correct path (mastodo…
Browse files Browse the repository at this point in the history
  • Loading branch information
thijskh authored and Jean Bertrand committed Feb 22, 2023
1 parent d68b212 commit b7009bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/routes.rb
Expand Up @@ -110,6 +110,8 @@

resource :inbox, only: [:create], module: :activitypub

get '/:encoded_at(*path)', to: redirect("/@%{path}"), constraints: { encoded_at: /%40/ }

constraints(username: /[^@\/.]+/) do
get '/@:username', to: 'accounts#show', as: :short_account
get '/@:username/with_replies', to: 'accounts#show', as: :short_account_with_replies
Expand Down

0 comments on commit b7009bc

Please sign in to comment.