Fix: Add Express route for assets to handle BOSA catch-all routing
This commit is contained in:
parent
95801c09f5
commit
165f8df467
1 changed files with 3 additions and 0 deletions
|
|
@ -83,6 +83,9 @@ app.get('/preview/:id', previewPage);
|
||||||
// The base path in Vite config ensures assets are referenced as /bp_wb/assets/*
|
// The base path in Vite config ensures assets are referenced as /bp_wb/assets/*
|
||||||
app.use('/assets', express.static(path.join(__dirname, 'dist', 'assets')));
|
app.use('/assets', express.static(path.join(__dirname, 'dist', 'assets')));
|
||||||
|
|
||||||
|
// Also handle assets with parameterized route (for BOSA catch-all routing)
|
||||||
|
app.get('/assets/:filepath', serveAssets);
|
||||||
|
|
||||||
// Handler function for manifest route (BOSA calls this)
|
// Handler function for manifest route (BOSA calls this)
|
||||||
async function serveAssets(req, res) {
|
async function serveAssets(req, res) {
|
||||||
const filepath = req.params.filepath || req.path.replace('/assets/', '');
|
const filepath = req.params.filepath || req.path.replace('/assets/', '');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue