Skip to content

Commit 1667eeb

Browse files
Merge pull request #2438 from sshevlyagin/ss-bodyParser-docs
docs(middleware): adding bodyParser customization documentation
2 parents f966702 + 185a8c3 commit 1667eeb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/middlewares.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ export class AppModule {
122122

123123
> info **Hint** The `configure()` method can be made asynchronous using `async/await` (e.g., you can `await` completion of an asynchronous operation inside the `configure()` method body).
124124
125+
> warning **Warning** When using the `express` adapter, the NestJS app will register `json` and `urlencoded` from the package `body-parser` by default. This means if you want to customize that middleware via the `MiddlewareConsumer`, you need to turn off the global middleware by setting the `bodyParser` flag to `false` when creating the application with `NestFactory.create()`.
126+
125127
#### Route wildcards
126128

127129
Pattern based routes are supported as well. For instance, the asterisk is used as a **wildcard**, and will match any combination of characters:

0 commit comments

Comments
 (0)