diff --git a/src/api/Webserver.ts b/src/api/Webserver.ts index 669b12b..74c45bd 100644 --- a/src/api/Webserver.ts +++ b/src/api/Webserver.ts @@ -35,10 +35,13 @@ export default class Webserver { // We register the default route last to make sure we don't override anything by accident. // We'll pass off all other requests to the web app - this.app.get("*", (_req, res) => { + this.app.get(/(widgets\/|riot\/|\/)*/, (_req, res) => { res.sendFile(path.join(__dirname, "..", "..", "web", "index.html")); }); + // Register the static content last + this.app.use(express.static(path.join(__dirname, "..", "..", "web"))); + // Set up the error handler this.app.use((err: any, _req, res, next) => { if (err instanceof ApiError) {