fixed redirect

This commit is contained in:
Daniel Hübleitner
2019-08-11 15:13:17 +02:00
parent d183911ee5
commit 6e6431d715
+2 -2
View File
@@ -183,7 +183,7 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
let port:number = this.conf.httpPort let port:number = this.conf.httpPort
this.express = express() this.express = express()
this.express.use(express.static('static')) this.express.use('/', express.static('static'))
this.express.get('/plugins/:id'+".js", (request, response) => { this.express.get('/plugins/:id'+".js", (request, response) => {
let frontend = this.pm.getFrontend(request.params.id) let frontend = this.pm.getFrontend(request.params.id)
@@ -193,7 +193,7 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
}) })
this.express.get("*", (req, res) => { this.express.get("*", (req, res) => {
res.status(301).redirect("/") res.status(301).redirect('/')
}) })
this.httpServer = new http.Server(this.express) this.httpServer = new http.Server(this.express)