File size: 414 Bytes
abed4cc
3c0cf05
 
abed4cc
3c0cf05
 
 
 
 
 
 
 
 
abed4cc
3c0cf05
abed4cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const express = require('express');
const request = require('request');

const app = express();

app.get('/*', (req, res) => {
  const url = 'https://platform.openai.com' + req.url;

  req.pipe(request(url)).pipe(res);
});

const port = 8080; // Выберите любой свободный порт

app.listen(port, () => {
  console.log(`Прокси-сервер запущен на порту ${port}`);
});