FEATURE: Implements a Well-Know URL for Changing Passwords

Read https://github.com/WICG/change-password-url/blob/gh-pages/explainer.md for details on the spec.
This commit is contained in:
Rafael dos Santos Silva 2019-03-25 23:46:27 -03:00
parent 71e431de9e
commit 51a6acb2af

View File

@ -345,6 +345,7 @@ Discourse::Application.routes.draw do
get "my/*path", to: 'users#my_redirect'
get "user_preferences" => "users#user_preferences_redirect"
get ".well-known/change-password", to: redirect(relative_url_root + 'my/preferences/account', status: 302)
%w{users u}.each_with_index do |root_path, index|
get "#{root_path}" => "users#index", constraints: { format: 'html' }