routes: replace the email param in the URL to a query param

This basically moves from:

    /lien-envoye/foo@bar.com

to:

    /lien-envoye?email=foo@bar.com

This allow to properly censor the data in Matomo (so that email
addresses don't end up stored in Matomo).
This commit is contained in:
Pierre de La Morinerie 2021-06-15 17:02:59 +02:00
parent e0dd0893f4
commit 51159117c9

View file

@ -105,7 +105,8 @@ Rails.application.routes.draw do
devise_scope :user do
get '/users/no_procedure' => 'users/sessions#no_procedure'
get 'connexion-par-jeton/:id' => 'users/sessions#sign_in_by_link', as: 'sign_in_by_link'
get 'lien-envoye/:email' => 'users/sessions#link_sent', constraints: { email: /.*/ }, as: 'link_sent'
get 'lien-envoye' => 'users/sessions#link_sent', as: 'link_sent'
get 'lien-envoye/:email' => 'users/sessions#link_sent', constraints: { email: /.*/ }, as: 'link_sent_legacy' # legacy, can be removed as soon as the previous line is deployed to production servers
get '/users/password/reset-link-sent' => 'users/passwords#reset_link_sent'
end