Commit 4ae94b41 authored by Will Cory's avatar Will Cory

allow body parser options to be passed in

parent a49e1040
---
'@eth-optimism/common-ts': minor
---
Add option to configure body parser
......@@ -124,6 +124,7 @@ export abstract class BaseServiceV2<
metricsSpec: MetricsSpec<TMetrics>
options?: Partial<TOptions & StandardOptions>
loop?: boolean
bodyParserParams?: bodyParser.OptionsJson
}
) {
this.loop = params.loop !== undefined ? params.loop : true
......@@ -330,6 +331,7 @@ export abstract class BaseServiceV2<
verify: (req, res, buf, encoding) => {
;(req as any).rawBody = buf?.toString(encoding || 'utf8') || ''
},
...this.params.bodyParserParams,
})
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment