Skip to content
Snippets Groups Projects
Unverified Commit aee09f63 authored by rinsuki's avatar rinsuki Committed by GitHub
Browse files

fix: WebFinger returns 500 (#9390)

parent f88c5e3b
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ import { NodeinfoServerService } from './NodeinfoServerService.js';
import type { FindOptionsWhere } from 'typeorm';
import { bindThis } from '@/decorators.js';
import type { FastifyInstance, FastifyPluginOptions } from 'fastify';
import fastifyAccepts from '@fastify/accepts';
@Injectable()
export class WellKnownServerService {
......@@ -41,6 +42,8 @@ export class WellKnownServerService {
const jrd = 'application/jrd+json';
const xrd = 'application/xrd+xml';
fastify.register(fastifyAccepts);
fastify.addHook('onRequest', (request, reply, done) => {
reply.header('Access-Control-Allow-Headers', 'Accept');
reply.header('Access-Control-Allow-Methods', 'GET, OPTIONS');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment