Skip to content

Commit

Permalink
fix(fastify): removed wrongly inserted header for future logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Stradivario committed Apr 3, 2024
1 parent f5f6e0f commit be877ae
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 @@ -18,7 +18,7 @@ export function corsHook(
const hostname = allowedOrigins.find((v) => v.name === req.hostname);
if (hostname) {
res.header('Access-Control-Allow-Origin', hostname.name);
res.header('Access-Control-Allow-Headers', hostname.name);
// res.header('Access-Control-Allow-Headers', hostname.name);
res.header('Access-Control-Allow-Methods', hostname.methods);
}
const isPreflight = /options/i.test(req.method);
Expand Down

0 comments on commit be877ae

Please sign in to comment.