diff --git a/nodejs-project/nodejs-project/src/client/middleware.js b/nodejs-project/nodejs-project/src/client/middleware.js index 46b8d45c..03d9d1d7 100644 --- a/nodejs-project/nodejs-project/src/client/middleware.js +++ b/nodejs-project/nodejs-project/src/client/middleware.js @@ -50,7 +50,19 @@ module.exports = ({ host, port, middleware, allowHost }) => { }); app.use(mount("/assets", assets)); - + + const maptiles = new Koa(); + maptiles.use(koaStatic(join(__dirname, "..", "maps", "tiles"))); + app.use(mount("/maptiles", maptiles)); + + const mapcache = new Koa(); + mapcache.use(koaStatic(join(__dirname, "..", "maps", "cache"))); + app.use(mount("/mapcache", mapcache)); + + const gamesStatic = new Koa(); + gamesStatic.use(koaStatic(join(__dirname, "..", "games"))); + app.use(mount("/game-assets", gamesStatic)); + // pdf viewer app.use(mount("/js", koaStatic(path.join(__dirname, 'public/js')))); app.use(koaStatic(path.join(__dirname, 'public'))); @@ -66,6 +78,7 @@ module.exports = ({ host, port, middleware, allowHost }) => { "img-src 'self'", "media-src 'self' blob:", "worker-src 'self' blob:", + "frame-src 'self'", "form-action 'self'", "object-src 'none'", "base-uri 'none'",