Refine auth, API proxy, and server routing
This commit is contained in:
+4
-3
@@ -31,9 +31,6 @@ app.use(cors({
|
||||
}));
|
||||
|
||||
app.use(express.json());
|
||||
app.use(express.static(path.join(__dirname, '../public')));
|
||||
app.use(express.static(path.join(__dirname, '../frontend/.next')));
|
||||
app.use(express.static(path.join(__dirname, '../frontend/.next/server/pages')));
|
||||
|
||||
// 请求日志
|
||||
app.use((req, res, next) => {
|
||||
@@ -55,6 +52,10 @@ app.get('/api/health', (req, res) => {
|
||||
res.json({ status: 'ok', timestamp: new Date().toISOString() });
|
||||
});
|
||||
|
||||
app.use(express.static(path.join(__dirname, '../public')));
|
||||
app.use(express.static(path.join(__dirname, '../frontend/.next')));
|
||||
app.use(express.static(path.join(__dirname, '../frontend/.next/server/pages')));
|
||||
|
||||
// 前端路由 - Next.js 静态文件
|
||||
app.get('/_next/static/:path(*)', (req, res) => {
|
||||
const filePath = path.join(__dirname, '../frontend/.next/static', req.params.path);
|
||||
|
||||
Reference in New Issue
Block a user