From df1efe5f96a32747aab76f407440dcbd4fb21d6f Mon Sep 17 00:00:00 2001 From: Opliko <25460763+oplik0@users.noreply.github.com> Date: Tue, 22 Oct 2019 18:16:09 +0200 Subject: [PATCH] feat: Implement WICG change-password-url (#7072) (#7990) * feat: Implement WICG change-password-url (#7072) * fix style for TravisCI --- src/routes/accounts.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/routes/accounts.js b/src/routes/accounts.js index f7dbbbd649..dfc975927a 100644 --- a/src/routes/accounts.js +++ b/src/routes/accounts.js @@ -29,6 +29,9 @@ module.exports = function (app, middleware, controllers) { setupPageRoute(app, '/user/:userslug/edit/username', middleware, accountMiddlewares, controllers.accounts.edit.username); setupPageRoute(app, '/user/:userslug/edit/email', middleware, accountMiddlewares, controllers.accounts.edit.email); setupPageRoute(app, '/user/:userslug/edit/password', middleware, accountMiddlewares, controllers.accounts.edit.password); + app.use('/.well-known/change-password', function (req, res) { + res.redirect('/me/edit/password'); + }); setupPageRoute(app, '/user/:userslug/info', middleware, accountMiddlewares, controllers.accounts.info.get); setupPageRoute(app, '/user/:userslug/settings', middleware, accountMiddlewares, controllers.accounts.settings.get); setupPageRoute(app, '/user/:userslug/uploads', middleware, accountMiddlewares, controllers.accounts.uploads.get);