fix: reset proxy
parent
e87316cc50
commit
5b951eb5df
|
@ -1,4 +1,4 @@
|
|||
var BaseUrl = "/api/";
|
||||
var BaseUrl = "http://api.soyootech.com/";
|
||||
export async function UserLogin(loginForm) {
|
||||
try {
|
||||
var response = await fetch(BaseUrl + "SoyooUser/previewlogin", {
|
||||
|
@ -12,7 +12,9 @@ export async function UserLogin(loginForm) {
|
|||
method: "POST",
|
||||
});
|
||||
var result = await response.json();
|
||||
result.permissionPages = result.permissionPages.map((permission) => permission.toLowerCase());
|
||||
result.permissionPages = result.permissionPages.map((permission) =>
|
||||
permission.toLowerCase()
|
||||
);
|
||||
return result;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
const { createProxyMiddleware } = require("http-proxy-middleware");
|
||||
|
||||
module.exports = function (app) {
|
||||
app.use(
|
||||
"/api", // 这是路径模式
|
||||
createProxyMiddleware({
|
||||
target: "https://api.soyootech.com/", // 目标服务器地址
|
||||
changeOrigin: true,
|
||||
pathRewrite: { "^/api": "" },
|
||||
})
|
||||
);
|
||||
// app.use(
|
||||
// "/api",
|
||||
// createProxyMiddleware({
|
||||
// target: "https://api.soyootech.com/",
|
||||
// changeOrigin: true,
|
||||
// pathRewrite: { "^/api": "" },
|
||||
// })
|
||||
// );
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue