Correct for wildcard tightening
This commit is contained in:
parent
1bd7a716fd
commit
724fb69c87
1 changed files with 2 additions and 2 deletions
|
|
@ -43,8 +43,8 @@ app.post('/api/files/import-demo', async (req, res) => {
|
|||
const distDir = path.resolve(__dirname, 'dist');
|
||||
app.use(express.static(distDir));
|
||||
|
||||
// SPA fallback
|
||||
app.get('*', (req, res) => {
|
||||
// SPA fallback (Express 5 requires middleware instead of bare '*')
|
||||
app.use((req, res) => {
|
||||
res.sendFile(path.join(distDir, 'index.html'));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue