Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MyBooty165 authored Feb 9, 2024
1 parent 3f60fbc commit e21ca5c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ if (cluster.isMaster) {
} else {
const app = express();

const nggurl = 'https://now.gg';
const targetUrl = 'https://now.gg';

const proxy = httpProxy.createProxyServer({
target: nggurl,
target: targetUrl,
changeOrigin: true,
});

app.use('/', (req, res) => {
console.log(`Requests: ${req.url}`);
proxy.web(req, res);
const target = url.resolve(targetUrl, req.url);
console.log(`Requests: ${req.url} - CYGGed to: ${target}`);
proxy.web(req, res, { target });
});

app.use((req, res, next) => {
Expand Down

0 comments on commit e21ca5c

Please sign in to comment.