diff --git a/README.md b/README.md index b46b08b..2d077b0 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,10 @@ iobroker add lametric Placeholder for the next version (at the beginning of the line): ### **WORK IN PROGRESS** --> +### **WORK IN PROGRESS** + +* (klein0r) Fixed web extension + ### 3.1.2 (2023-12-27) * (klein0r) Updated LaMetric firmware version recommendation to 2.3.8 (3.0.21) diff --git a/lib/web.js b/lib/web.js index 14dee27..0adf253 100644 --- a/lib/web.js +++ b/lib/web.js @@ -28,8 +28,6 @@ class LaMetricWebExtension { if (this.settings.secure) { this.adapter.log.error(`Unable to register ${this.namespace} web extension - HTTPS is not supported by LaMetric`); } else { - this.adapter.log.info(`${this.namespace} server listening on port http://${this.adapter.config.bind}:${this.settings.port}/${this.namespace}/`); - if (this.app && this.config.type === 'poll') { this.app.use(this.appPath, (req, res) => { this.adapter.log.debug(`Received ${req.method} request on ${req.url}`); @@ -52,6 +50,8 @@ class LaMetricWebExtension { res.status(500).send(JSON.stringify({ error: 'unsupported method' })); } }); + + this.adapter.log.info(`${this.namespace} server listening on port http://${this.adapter.config.bind}:${this.settings.port}/${this.namespace}/`); } }