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 ClearlyClaire committed Mar 14, 2023
1 parent 4ea4c3f commit c44ddbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/routes.rb
Expand Up @@ -109,6 +109,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 c44ddbd

Please sign in to comment.