cont.
This commit is contained in:
parent
c0d1e08c17
commit
aaecccf5d9
|
@ -6,7 +6,6 @@ const { createProxyMiddleware } = require('http-proxy-middleware');
|
|||
|
||||
const app = express();
|
||||
app.use('/build', express.static('build'));
|
||||
const proxy = createProxyMiddleware(options('http://localhost:8080'));
|
||||
|
||||
const options = (target) => {
|
||||
return {
|
||||
|
@ -20,6 +19,9 @@ const options = (target) => {
|
|||
};
|
||||
}
|
||||
|
||||
const proxy = createProxyMiddleware(options('http://localhost:8080'));
|
||||
|
||||
|
||||
// 设置代理
|
||||
// app.use(['/api/zone', '/api/cms'], (req, res) => {
|
||||
// proxy(req, res);
|
||||
|
|
Loading…
Reference in New Issue