feat(server): add raw body parsing for multipart/form-data and application/octet-stream
- Implemented a new middleware to handle raw body parsing for specific content types, allowing for larger payloads up to 5mb. - Enhanced form body serialization to support Buffer input, improving compatibility with various data formats during proxy interactions.
This commit is contained in:
@@ -75,6 +75,11 @@ app.use(cors({
|
||||
allowedHeaders: ['Content-Type', 'Authorization', 'authcode', 'userid']
|
||||
}));
|
||||
|
||||
app.use('/api/clicktt/proxy', express.raw({
|
||||
type: ['multipart/form-data', 'application/octet-stream'],
|
||||
limit: '5mb',
|
||||
verify: captureRawBody,
|
||||
}));
|
||||
app.use(express.json({ verify: captureRawBody }));
|
||||
app.use(express.urlencoded({ extended: true, verify: captureRawBody }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user