From 64edc56222e9382d53db890afd392cd73850f541 Mon Sep 17 00:00:00 2001 From: Tim Shamilov Date: Wed, 7 Aug 2024 15:35:28 +0800 Subject: [PATCH] add middleware to accept formdata --- src/http-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http-api.ts b/src/http-api.ts index 3523d70..8d1142b 100644 --- a/src/http-api.ts +++ b/src/http-api.ts @@ -84,7 +84,7 @@ export class HttpApi { #setupMiddleware(): void { this.#api.use(cors({ exposedHeaders: 'dwn-response' })); this.#api.use(express.json()); - + this.#api.use(express.urlencoded({ extended: true })); this.#api.use( responseTime((req: Request, res: Response, time) => { const url = req.url === '/' ? '/jsonrpc' : req.url;