mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(package): no fallback serve for package mode
This commit is contained in:
+9
-7
@@ -256,12 +256,14 @@ if (config.debugInfo) {
|
||||
// Only enable tracing in debug mode
|
||||
app.get('/metrics', metrics);
|
||||
}
|
||||
app.use(
|
||||
'/*',
|
||||
serveStatic({
|
||||
root: path.join(__dirname, 'assets'),
|
||||
rewriteRequestPath: (path) => (path === '/favicon.ico' ? '/favicon.png' : path),
|
||||
})
|
||||
);
|
||||
if (!config.isPackage) {
|
||||
app.use(
|
||||
'/*',
|
||||
serveStatic({
|
||||
root: path.join(__dirname, 'assets'),
|
||||
rewriteRequestPath: (path) => (path === '/favicon.ico' ? '/favicon.png' : path),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
export default app;
|
||||
|
||||
Reference in New Issue
Block a user