diff options
author | Chocobozzz <me@florianbigard.com> | 2019-06-07 15:04:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-06-07 15:04:41 +0200 |
commit | b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62 (patch) | |
tree | 754bb49026d4df8086030e28a8a7c16e3f0338b6 /server/controllers/static.ts | |
parent | 851f5daa1eec66e1faa3c45238ec9ab91be05b00 (diff) | |
parent | 03371ad9d049bab79445a1b35da44cb1272f6c28 (diff) | |
download | PeerTube-b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62.tar.gz PeerTube-b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62.tar.zst PeerTube-b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62.zip |
Merge branch 'release/v1.3.0' into develop
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r-- | server/controllers/static.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index d57dba6ce..a6b462443 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -156,6 +156,19 @@ staticRouter.use('/.well-known/change-password', | |||
156 | } | 156 | } |
157 | ) | 157 | ) |
158 | 158 | ||
159 | staticRouter.use('/.well-known/host-meta', | ||
160 | (_, res: express.Response) => { | ||
161 | res.type('application/xml') | ||
162 | |||
163 | const xml = '<?xml version="1.0" encoding="UTF-8"?>\n' + | ||
164 | '<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">\n' + | ||
165 | ` <Link rel="lrdd" type="application/xrd+xml" template="${WEBSERVER.URL}/.well-known/webfinger?resource={uri}"/>\n` + | ||
166 | '</XRD>' | ||
167 | |||
168 | res.send(xml).end() | ||
169 | } | ||
170 | ) | ||
171 | |||
159 | // --------------------------------------------------------------------------- | 172 | // --------------------------------------------------------------------------- |
160 | 173 | ||
161 | export { | 174 | export { |