aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-12-07 01:42:00 +0100
committerChocobozzz <me@florianbigard.com>2018-12-07 13:56:08 +0100
commit314141279db4826bf4862576b7e0df104834ad00 (patch)
treeed4acb0108443b2503f371589f9beb9892b116a3 /server
parent14d1b7b95a096b933ea353a715f4868a89dc5822 (diff)
downloadPeerTube-314141279db4826bf4862576b7e0df104834ad00.tar.gz
PeerTube-314141279db4826bf4862576b7e0df104834ad00.tar.zst
PeerTube-314141279db4826bf4862576b7e0df104834ad00.zip
(well-known url) add change-password
Diffstat (limited to 'server')
-rw-r--r--server/controllers/static.ts6
-rw-r--r--server/tests/misc-endpoints.ts10
2 files changed, 16 insertions, 0 deletions
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/',
136 } 136 }
137) 137)
138 138
139staticRouter.use('/.well-known/change-password',
140 (_, res: express.Response) => {
141 res.redirect('/my-account/settings')
142 }
143)
144
139// --------------------------------------------------------------------------- 145// ---------------------------------------------------------------------------
140 146
141export { 147export {
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 () {
72 72
73 expect(res.body.tracking).to.equal('N') 73 expect(res.body.tracking).to.equal('N')
74 }) 74 })
75
76 it('Should get change-password location', async function () {
77 const res = await makeGetRequest({
78 url: server.url,
79 path: '/.well-known/change-password',
80 statusCodeExpected: 302
81 })
82
83 expect(res.header.location).to.equal('/my-account/settings')
84 })
75 }) 85 })
76 86
77 describe('Test classic static endpoints', function () { 87 describe('Test classic static endpoints', function () {