Authored by 李奇

跨域配置修改

Showing 1 changed file with 4 additions and 1 deletions
... ... @@ -51,7 +51,10 @@ const middleware = require('./middleware');
try {
// 允许跨域
app.use(cors());
app.use(cors({
credentials: true,
origin: 'http://localhost:8080'
}));
// 用户信息
app.use(middleware.user);
... ...