Skip to content

Commit 1063d38

Browse files
authored
Merge pull request #17 from j4ys0n/request-limit
set req limit before adding middleware
2 parents ea4bffd + 6d232a8 commit 1063d38

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "llm-proxy",
3-
"version": "1.4.2",
3+
"version": "1.4.3",
44
"description": "Manages Nginx for reverse proxy to multiple LLMs, with TLS & Bearer Auth tokens",
55
"main": "dist/index.js",
66
"scripts": {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ const port = process.env.PORT || 8080
1414
const targetUrls = (process.env.TARGET_URLS || 'http://example.com').split(',').map((url) => url.trim())
1515

1616
// app.use(express.json())
17-
app.use(bodyParser.json())
1817
const payloadLimit = process.env.PAYLOAD_LIMIT || '1mb'
1918
app.use(bodyParser.json({ limit: payloadLimit }))
2019
app.use(bodyParser.urlencoded({ extended: false, limit: payloadLimit }))
20+
app.use(bodyParser.json())
2121
log('info', `Payload limit is: ${payloadLimit}`)
2222

2323
// Express routes

0 commit comments

Comments
 (0)