Spaces:
Building
Building
Update server.js
Browse files
server.js
CHANGED
@@ -4,6 +4,9 @@ const app = express();
|
|
4 |
const targetUrl = 'https://generativelanguage.googleapis.com';
|
5 |
const port = 7860;
|
6 |
|
|
|
|
|
|
|
7 |
app.use('/', proxy(targetUrl, {
|
8 |
https: true,
|
9 |
proxyReqOptDecorator: (proxyReqOpts, srcReq) => {
|
|
|
4 |
const targetUrl = 'https://generativelanguage.googleapis.com';
|
5 |
const port = 7860;
|
6 |
|
7 |
+
app.use(express.json({ limit: '10mb' }));
|
8 |
+
app.use(express.urlencoded({ limit: '10mb', extended: true }));
|
9 |
+
|
10 |
app.use('/', proxy(targetUrl, {
|
11 |
https: true,
|
12 |
proxyReqOptDecorator: (proxyReqOpts, srcReq) => {
|