支持本地CookieCloud服务器

This commit is contained in:
ljmeng
2024-03-16 18:23:24 +08:00
parent 44163f0fb2
commit 664b6610f3
3 changed files with 37 additions and 1 deletions
+10
View File
@@ -25,6 +25,16 @@ app.use(
})
);
// 配置代理中间件将CookieCloud请求转发给后端API
app.use(
'/cookiecloud',
proxy(`${proxyConfig.URL}:${proxyConfig.PORT}`, {
// 路径加上 /api 前缀
proxyReqPathResolver: (req) => {
return `/cookiecloud${req.url}`
}
})
);
// 处理根路径的请求
app.get('/', (req, res) => {