Skip to content

Commit

Permalink
feat: ✨ add bodyParserOptions to server class
Browse files Browse the repository at this point in the history
  • Loading branch information
evertdespiegeleer committed Sep 30, 2024
1 parent e1bb9ae commit 356ca98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface IHTTPOptions {
trustProxy?: boolean
oasInfo?: OASInfo
logger?: ILogger
bodyParserOptions?: bodyParser.OptionsJson
}

export let oasInstance: Oas
Expand Down Expand Up @@ -53,7 +54,7 @@ export class Server {
this.httpServer = createServer(this.app)

this.app.set('trust proxy', this.httpOptions.trustProxy)
this.app.use(bodyParser.json())
this.app.use(bodyParser.json(httpOptions.bodyParserOptions))
this.app.use(
cors({
credentials: true,
Expand Down

0 comments on commit 356ca98

Please sign in to comment.