mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-26 10:05:10 +00:00
.
This commit is contained in:
23
proxy.ts
Normal file
23
proxy.ts
Normal 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}/`),
|
||||
);
|
||||
Reference in New Issue
Block a user