Skip to content

Commit

Permalink
fix(fastify): allow origin methods are now spreaded into the string
Browse files Browse the repository at this point in the history
  • Loading branch information
Stradivario committed Apr 3, 2024
1 parent ca993df commit 40216be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fastify/src/helpers/hooks/cors.hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function corsHook(
if (hostname) {
res.header('Access-Control-Allow-Origin', hostname.name);
// res.header('Access-Control-Allow-Headers', hostname.name);
res.header('Access-Control-Allow-Methods', hostname.methods);
res.header('Access-Control-Allow-Methods', hostname.methods?.join());
}
const isPreflight = /options/i.test(req.method);
if (isPreflight) {
Expand Down

0 comments on commit 40216be

Please sign in to comment.