Fix: Prevent src/public from overriding frontend dist on root path
This commit is contained in:
@@ -125,8 +125,11 @@ app.updateCorsSettings = updateCorsFromSettings;
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
|
||||
// Serve static files (landing page)
|
||||
app.use(express.static('src/public'));
|
||||
// Serve static files (landing page) - but only for specific paths
|
||||
// Don't serve from public if frontend dist exists (to avoid conflicts)
|
||||
if (!fs.existsSync(frontendDistPath)) {
|
||||
app.use(express.static('src/public'));
|
||||
}
|
||||
|
||||
// Serve frontend build files (if exists, for production)
|
||||
const path = require('path');
|
||||
|
||||
Reference in New Issue
Block a user