HostMeta: pretty xml
This commit is contained in:
parent
19d7d1ae52
commit
8894bb5513
|
@ -2,13 +2,18 @@ import { Conf } from '@/config.ts';
|
|||
|
||||
import type { AppController } from '@/app.ts';
|
||||
|
||||
/** https://datatracker.ietf.org/doc/html/rfc6415 */
|
||||
const hostMetaController: AppController = (c) => {
|
||||
const template = Conf.local('/.well-known/webfinger?resource={uri}');
|
||||
|
||||
c.header('content-type', 'application/xrd+xml');
|
||||
|
||||
return c.body(
|
||||
`<?xml version="1.0" encoding="UTF-8"?><XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"><Link rel="lrdd" template="${template}" type="application/xrd+xml" /></XRD>`,
|
||||
`<?xml version="1.0" encoding="UTF-8"?>
|
||||
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
|
||||
<Link rel="lrdd" template="${template}" type="application/xrd+xml" />
|
||||
</XRD>
|
||||
`,
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue