-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Open
Labels
area: @angular/cligemini-triagedLabel noting that an issue has been triaged by geminiLabel noting that an issue has been triaged by gemini
Description
Command
serve
Description
Dev server middleware configuration is very commonly used in development,such as auto login or log printing,but it is not currently supported。
Describe the solution you'd like
Refer to the implementation of proxyConfig, add the middlewareConfig configuration to angular.json -> server -> options, and parse and inject the middleware in angular/build.
middlewareConfig supports configuring a js file path, and the file exports a single middleware function or an array of multipe middleware functions. such as:
function log(req, res, next) {
next()
}
module.exports = log;
function log(req, res, next) {
next()
}
function auth(req, res, next) {
next()
}
module.exports =
[
log,
auth,
]
Describe alternatives you've considered
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: @angular/cligemini-triagedLabel noting that an issue has been triaged by geminiLabel noting that an issue has been triaged by gemini