Skip to content

Commit

Permalink
fix: 启动问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
elecV2 committed Dec 14, 2024
1 parent 529bbe4 commit e2de1c6
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions webmodule.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const http = require('http')
const path = require('path')
const express = require('express')
const compression = require('compression')
const { createProxyMiddleware } = require('http-proxy-middleware')

const { CONFIG, CONFIG_Port } = require('./config')

Expand Down Expand Up @@ -70,14 +69,6 @@ module.exports = () => {
wbrun(app)
wbeapp(app)

app.use(['/eproxy-logs', '/dist', '/latestLog', '/do-not-proxy', '/api/getInitData', '/fetchBody'], createProxyMiddleware({
target: 'http://localhost:' + CONFIG_Port.webif,
changeOrigin: true,
logLevel: CONFIG.gloglevel || 'info',
pathRewrite: {
'^/eproxy-logs': '/',
},
}))
app.use((req, res, next) => {
res.status(404).send(htmlTemplate(`<h3 style="margin-top: 0;padding: 140px 1em 0;white-space: pre-wrap;word-break: break-all;">${req.method} ${req.originalUrl}</h3>
<h1>404, Not Found</h1><br>
Expand Down

0 comments on commit e2de1c6

Please sign in to comment.