fix: fix cors
This commit is contained in:
parent
13a6e4a0a9
commit
bf15353dd0
@ -64,7 +64,7 @@ export async function startApi(): Promise<{ app: FastifyInstance; io: Server }>
|
|||||||
app.register(import('@fastify/cors'), {
|
app.register(import('@fastify/cors'), {
|
||||||
origin: '*',
|
origin: '*',
|
||||||
allowedHeaders: '*',
|
allowedHeaders: '*',
|
||||||
methods: ['GET', 'POST']
|
methods: ['GET', 'POST', 'DELETE']
|
||||||
});
|
});
|
||||||
app.get('/', function (request, reply) {
|
app.get('/', function (request, reply) {
|
||||||
reply.send('Welcome to Happy Server!');
|
reply.send('Welcome to Happy Server!');
|
||||||
|
Loading…
Reference in New Issue
Block a user