diff options
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 05019fcc2..73951be2d 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 { |