fix headers sent error
This commit is contained in:
parent
02d616ba97
commit
78b0c46c29
|
@ -40,7 +40,9 @@ export default class Webserver {
|
||||||
// We register the default route last to make sure we don't override anything by accident.
|
// 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
|
// We'll pass off all other requests to the web app
|
||||||
this.app.get(/(widgets\/|riot\/|element\/|\/)*/, (_req, res) => {
|
this.app.get(/(widgets\/|riot\/|element\/|\/)*/, (_req, res) => {
|
||||||
res.sendFile(path.join(__dirname, "..", "..", "web", "index.html"));
|
if (!res.headersSent) {
|
||||||
|
res.sendFile(path.join(__dirname, "..", "..", "web", "index.html"));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set up the error handler
|
// Set up the error handler
|
||||||
|
|
Loading…
Reference in a new issue