revert: disable reverse-proxy (Sechenov banned our IPs), restore local clone on /

This commit is contained in:
aedes
2026-04-21 17:21:41 +03:00
parent 99b4b58f89
commit 6186f31b66

View File

@@ -141,9 +141,10 @@ app.post('/api/chat', express.json({ limit: '10mb' }), async (req, res) => {
// LEGACY / LOCAL ROUTES // LEGACY / LOCAL ROUTES
// ══════════════════════════════════════════════════════════════ // ══════════════════════════════════════════════════════════════
// Main page: local clone (reverse-proxy disabled — Sechenov banned our IPs)
app.use(express.static(PUBLIC_DIR));
app.get(['/old', '/old.html'], (_req, res) => res.sendFile(path.join(PUBLIC_DIR, 'index.html'))); app.get(['/old', '/old.html'], (_req, res) => res.sendFile(path.join(PUBLIC_DIR, 'index.html')));
app.get(['/iframe', '/iframe.html'], (_req, res) => res.sendFile(path.join(PUBLIC_DIR, 'iframe.html'))); app.get(['/iframe', '/iframe.html'], (_req, res) => res.sendFile(path.join(PUBLIC_DIR, 'iframe.html')));
app.use('/assets', express.static(path.join(PUBLIC_DIR, 'assets')));
// Legacy HTML-only proxy used by /iframe.html // Legacy HTML-only proxy used by /iframe.html
app.get('/proxy/*', async (req, res) => { app.get('/proxy/*', async (req, res) => {
@@ -223,7 +224,8 @@ const CHAT_OVERLAY = `
</script> </script>
`; `;
app.use(async (req, res) => { // Reverse-proxy disabled: Sechenov banned us by IP. Left here for reference.
app.use('/_disabled_reverse_proxy', async (req, res) => {
const upstreamUrl = UPSTREAM + req.url; const upstreamUrl = UPSTREAM + req.url;
// Build forward headers // Build forward headers