Title: Allowing using middleware config in dev server options · Issue #32811 · angular/angular-cli · GitHub
Open Graph Title: Allowing using middleware config in dev server options · Issue #32811 · angular/angular-cli
X Title: Allowing using middleware config in dev server options · Issue #32811 · angular/angular-cli
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 prox...
Open Graph 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 ...
X 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...
Opengraph URL: https://github.com/angular/angular-cli/issues/32811
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allowing using middleware config in dev server options","articleBody":"### Command\n\nserve\n\n### Description\n\nDev server middleware configuration is very commonly used in development,such as auto login or log printing,but it is not currently supported。\n\n### Describe the solution you'd like\n\nRefer to the implementation of proxyConfig, add the middlewareConfig configuration to angular.json -\u003e server -\u003e options, and parse and inject the middleware in angular/build.\nmiddlewareConfig supports configuring a js file path, and the file exports a single middleware function or an array of multipe middleware functions. such as:\n```\nfunction log(req, res, next) {\n next()\n}\n\nmodule.exports = log;\n```\n\n```\nfunction log(req, res, next) {\n next()\n}\n\nfunction auth(req, res, next) {\n next()\n}\n\nmodule.exports =\n [\n log,\n auth,\n ]\n```\n\n### Describe alternatives you've considered\n\n_No response_","author":{"url":"https://github.com/tianma630","@type":"Person","name":"tianma630"},"datePublished":"2026-03-21T02:05:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/32811/angular-cli/issues/32811"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b2e42675-7905-cab2-7ffb-2db8c2af199c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB5E:334CD9:3ABEF6:4FBAC5:6A62D0CB |
| html-safe-nonce | 18d860dd5eb768a0c1981f14c50e1d247116783bb013d202d41b69bf8a597923 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjVFOjMzNENEOTozQUJFRjY6NEZCQUM1OjZBNjJEMENCIiwidmlzaXRvcl9pZCI6IjIyMTcwNDAwNjk2MTc5NjMyMTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d6f17b52ac887877bfca3f9a5b3acdd3b5812a01045ac225032f6e0da18be485 |
| hovercard-subject-tag | issue:4110990844 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/32811/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8304883a639e4db40fa3e21d8fbc4690feb5e652e0edd904064493936ce2985d/angular/angular-cli/issues/32811 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8304883a639e4db40fa3e21d8fbc4690feb5e652e0edd904064493936ce2985d/angular/angular-cli/issues/32811 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tianma630 |
| hostname | github.com |
| expected-hostname | github.com |
| None | df33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d41cd1bdb290013455c0ac430fa755621733f5eb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width