---
displayed_sidebar: homepage
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# MiddlewaresConfig

 **MiddlewaresConfig**: `Object`

## Type declaration

<ParameterTypes parameters={[
  {
    "name": "errorHandler",
    "type": "`false` \\| [MedusaErrorHandlerFunction](medusa.MedusaErrorHandlerFunction.mdx)",
    "description": "",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "routes",
    "type": "[MiddlewareRoute](medusa.MiddlewareRoute.mdx)[]",
    "description": "",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "bodyParser",
        "type": "[ParserConfig](medusa.ParserConfig.mdx)",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "matcher",
        "type": "`string` \\| `RegExp`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "method",
        "type": "[MiddlewareVerb](medusa.MiddlewareVerb.mdx) \\| [MiddlewareVerb](medusa.MiddlewareVerb.mdx)[]",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "middlewares",
        "type": "[MiddlewareFunction](medusa.MiddlewareFunction.mdx)[]",
        "description": "",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  }
]} />
