-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump the nest-js-core group with 4 updates #2277
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,7 +129,7 @@ export class AppModule implements NestModule { | |
// Excludes the paths under '/' (base url) from being served as static content | ||
// If we do not exclude these paths, the service will try to find the file and | ||
// return 500 for files that do not exist instead of a 404 | ||
exclude: ['/(.*)'], | ||
exclude: ['{*any}'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The excluded paths are passed to path-to-regexp, which no longer accepts certain unexpected characters. This stems from Express v5. |
||
}), | ||
TypeOrmModule.forRootAsync({ | ||
imports: [ConfigModule], | ||
|
@@ -181,6 +181,6 @@ export class AppModule implements NestModule { | |
// The ClsMiddleware needs to be applied before the LoggerMiddleware | ||
// in order to generate the request ids that will be logged afterward | ||
.apply(ClsMiddleware, NotFoundLoggerMiddleware) | ||
.forRoutes({ path: '*', method: RequestMethod.ALL }); | ||
.forRoutes({ path: '{*any}', method: RequestMethod.ALL }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. path-to-regexp no longer accpets unexpected |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to update this here as the package otherwise prevents startup. Internally, it has an unexpected
*
path, which goes against the new path-to-regexp requirements. This stems from Express v5.