Spaces:
Paused
Paused
Vladimir Alabov
commited on
Commit
·
9aff024
1
Parent(s):
8db509b
'gpr'
Browse files
server.js
CHANGED
|
@@ -3,16 +3,15 @@ const proxy = require('express-http-proxy');
|
|
| 3 |
const app = express();
|
| 4 |
const targetUrl = 'https://generativelanguage.googleapis.com';
|
| 5 |
const port = 7860;
|
| 6 |
-
const baseUrl = 'gem';
|
| 7 |
|
| 8 |
app.use('/', proxy(targetUrl, {
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
},
|
| 14 |
}));
|
| 15 |
|
| 16 |
-
app.
|
| 17 |
-
|
| 18 |
});
|
|
|
|
| 3 |
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) => {
|
| 10 |
+
// console.log(srcReq);
|
| 11 |
+
return proxyReqOpts;
|
| 12 |
},
|
| 13 |
}));
|
| 14 |
|
| 15 |
+
app.listen(port, () => {
|
| 16 |
+
console.log(`GRP`);
|
| 17 |
});
|