Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnonni committed Aug 8, 2024
2 parents e2a681b + f447036 commit a6798b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@web5/dwn-server",
"type": "module",
"version": "0.4.4",
"version": "0.4.5",
"files": [
"dist",
"src"
Expand Down
5 changes: 4 additions & 1 deletion src/http-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ export class HttpApi {
#setupMiddleware(): void {
this.#api.use(cors({ exposedHeaders: 'dwn-response' }));
this.#api.use(express.json());
this.#api.use(express.urlencoded({ extended: true })); // formdata middleware

// We enable the formData middleware to handle multipart/form-data requests.
// This is necessary for the endpoints used by the Web5 Connect Server/OIDC flow.
this.#api.use(express.urlencoded({ extended: true }));
this.#api.use(
responseTime((req: Request, res: Response, time) => {
const url = req.url === '/' ? '/jsonrpc' : req.url;
Expand Down

0 comments on commit a6798b7

Please sign in to comment.