mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Use default middleware for parsing request body
This commit is contained in:
@ -113,6 +113,9 @@ app.use(helmet({
|
||||
app.use(compression());
|
||||
app.use(responseTime());
|
||||
|
||||
app.use(bodyParser.json({ limit: '200mb' }));
|
||||
app.use(bodyParser.urlencoded({ extended: true, limit: '200mb' }));
|
||||
|
||||
// CORS Settings //
|
||||
const CORS = cors({
|
||||
origin: 'null',
|
||||
@ -135,9 +138,6 @@ if (cliArgs.listen) {
|
||||
}
|
||||
|
||||
if (cliArgs.enableCorsProxy) {
|
||||
app.use(bodyParser.json({
|
||||
limit: '200mb',
|
||||
}));
|
||||
app.use('/proxy/:url(*)', corsProxyMiddleware);
|
||||
} else {
|
||||
app.use('/proxy/:url(*)', async (_, res) => {
|
||||
|
Reference in New Issue
Block a user