1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-26 10:05:10 +00:00
This commit is contained in:
zumbiepig
2024-09-24 14:24:58 -07:00
parent f02e39593f
commit bf252d7707
6 changed files with 29 additions and 126 deletions

23
proxy.ts Normal file
View File

@@ -0,0 +1,23 @@
import express from 'express';
import morgan from 'morgan';
import httpProxy from 'http-proxy';
const PORT = process.env['PORT'] ?? 3000;
const proxy = httpProxy.createProxyServer({
target: 'https://launcher.orionzleon.me',
ws: true,
xfwd: true,
secure: true,
changeOrigin: true,
});
const app = express();
app.use(morgan('combined'));
app.use((req, res) => proxy.web(req, res));
app.listen(PORT, () =>
console.log(`Server running on http://localhost:${PORT}/`),
);