Skip to content

Commit 0c74d13

Browse files
committed
fix: error cors on perfil front2
1 parent 1dd314c commit 0c74d13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ app.register(fastifyCors, {
2424
cb(new Error(`Not allowed from origin ${origin}`), false)
2525
},
2626
credentials: true,
27-
methods: '*',
27+
methods: ['GET', 'HEAD', 'PUT', 'PATCH', 'POST', 'DELETE', 'OPTIONS'],
28+
allowedHeaders: ['Content-Type', 'Authorization', 'Accept'],
2829
})
2930

3031
app.get('/', (_, reply: FastifyReply) => {

0 commit comments

Comments
 (0)