Skip to content

Commit

Permalink
Max body-parser file size is now 500MB by default. lwsjs/local-web-se…
Browse files Browse the repository at this point in the history
…rver#130

Upgrade deps, dates, CI
  • Loading branch information
75lb committed Jul 25, 2024
1 parent edd12ea commit 61eddce
Show file tree
Hide file tree
Showing 7 changed files with 862 additions and 1,562 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12, 14, 16]
node-version: [12, 14, 16, 18, 20, 22]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test:ci
- run: npm install
- run: npm test
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-22 Lloyd Brookes <[email protected]>
Copyright (c) 2016-24 Lloyd Brookes <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Body parsing middleware for lws, wrapping [koa-bodyparser](https://github.com/ko

* * *

&copy; 2016-22 Lloyd Brookes \<[email protected]\>.
&copy; 2016-24 Lloyd Brookes \<[email protected]\>.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ class BodyParser {
description () {
return 'Parses the request body, making `ctx.request.body` available to downstream middleware.'
}

middleware () {
return koaBodyParser()
return koaBodyParser({
formLimit: '500mb',
jsonLimit: '500mb',
textLimit: '500mb',
xmlLimit: '500mb'
})
}
}

Expand Down
Loading

0 comments on commit 61eddce

Please sign in to comment.