From 314141279db4826bf4862576b7e0df104834ad00 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 7 Dec 2018 01:42:00 +0100 Subject: (well-known url) add change-password --- server/controllers/static.ts | 6 ++++++ server/tests/misc-endpoints.ts | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/server/controllers/static.ts b/server/controllers/static.ts index 55e7392a1..4fd58f70c 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts @@ -136,6 +136,12 @@ staticRouter.use('/.well-known/dnt/', } ) +staticRouter.use('/.well-known/change-password', + (_, res: express.Response) => { + res.redirect('/my-account/settings') + } +) + // --------------------------------------------------------------------------- export { diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts index b53803ee1..4de47d693 100644 --- a/server/tests/misc-endpoints.ts +++ b/server/tests/misc-endpoints.ts @@ -72,6 +72,16 @@ describe('Test misc endpoints', function () { expect(res.body.tracking).to.equal('N') }) + + it('Should get change-password location', async function () { + const res = await makeGetRequest({ + url: server.url, + path: '/.well-known/change-password', + statusCodeExpected: 302 + }) + + expect(res.header.location).to.equal('/my-account/settings') + }) }) describe('Test classic static endpoints', function () { -- cgit v1.2.3