Respond .well-known/host-meta.json with application/json (#11777)

According to RFC 6415 appendix-A.
   The server
   MUST include the HTTP "Content-Type" response header field with a
   value of "application/json".  Any other "Content-Type" value (or lack
   thereof) indicates that the server does not support the JRD format.
"application/jrd+json" is only used by WebFinger (RFC 7033)
This commit is contained in:
xtex 2023-09-03 15:42:32 +08:00 committed by GitHub
parent 724ed47e5f
commit a53727f1a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ export class WellKnownServerService {
});
fastify.get('/.well-known/host-meta.json', async (request, reply) => {
reply.header('Content-Type', jrd);
reply.header('Content-Type', 'application/json');
return {
links: [{
rel: 'lrdd',