File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " llm-proxy" ,
3
- "version" : " 1.4.1 " ,
3
+ "version" : " 1.4.2 " ,
4
4
"description" : " Manages Nginx for reverse proxy to multiple LLMs, with TLS & Bearer Auth tokens" ,
5
5
"main" : " dist/index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -5,18 +5,19 @@ import { LLMController } from './controllers/llm'
5
5
import { tokenMiddleware } from './utils/auth'
6
6
import { AuthController } from './controllers/auth'
7
7
import { log } from './utils/general'
8
+ import bodyParser from 'body-parser'
8
9
9
10
dotenv . config ( )
10
11
11
12
const app = express ( )
12
13
const port = process . env . PORT || 8080
13
14
const targetUrls = ( process . env . TARGET_URLS || 'http://example.com' ) . split ( ',' ) . map ( ( url ) => url . trim ( ) )
14
15
15
- app . use ( express . json ( ) )
16
-
16
+ // app.use(express.json())
17
+ app . use ( bodyParser . json ( ) )
17
18
const payloadLimit = process . env . PAYLOAD_LIMIT || '1mb'
18
- app . use ( express . json ( { limit : payloadLimit } ) )
19
- app . use ( express . urlencoded ( { limit : payloadLimit , extended : true } ) )
19
+ app . use ( bodyParser . json ( { limit : payloadLimit } ) )
20
+ app . use ( bodyParser . urlencoded ( { extended : false , limit : payloadLimit } ) )
20
21
log ( 'info' , `Payload limit is: ${ payloadLimit } ` )
21
22
22
23
// Express routes
You can’t perform that action at this time.
0 commit comments