main
| 1 | import { |
| 2 | configureStoreSearch, |
| 3 | defineMiddlewares, |
| 4 | } from "@medusajs/framework/http" |
| 5 | |
| 6 | // The search fixture registers a `customer` index too, left out on purpose: the |
| 7 | // store search tests assert an index has to be opted in before it is reachable. |
| 8 | export default defineMiddlewares({ |
| 9 | routes: [ |
| 10 | { |
| 11 | matcher: "/store/search", |
| 12 | middlewares: [ |
| 13 | configureStoreSearch({ |
| 14 | allowed_indexes: { |
| 15 | product: true, |
| 16 | }, |
| 17 | }), |
| 18 | ], |
| 19 | }, |
| 20 | ], |
| 21 | }) |