Skip to content

Commit

Permalink
fix(routes): disable exposing HEAD route for each GET method
Browse files Browse the repository at this point in the history
  • Loading branch information
phucvinh57 committed May 23, 2023
1 parent 9340448 commit 5825529
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/createPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export function createPlugin(swaggerTags: HandlerTag[], routesOptions: RouteOpti
schema: {
...options.schema,
tags: swaggerTags
}
},
/**
* True by default. See https://www.fastify.io/docs/latest/Reference/Server/#exposeHeadRoutes
* About HEAD http method: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD
*/
exposeHeadRoute: false
});
});
};
Expand Down

0 comments on commit 5825529

Please sign in to comment.