Fix configured QR control URL at startup

This commit is contained in:
2026-08-03 22:05:46 -05:00
parent 50315bcc9e
commit 11521ff80a
4 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -57,7 +57,8 @@ module.exports = NodeHelper.create({
);
this.expressApp.get("/MMM-NextcloudCookbook/qr.svg", async (request, response, next) => {
try {
const url = this.config.controlUrl
const url = request.query.url
|| this.config.controlUrl
|| `${request.protocol}://${request.get("host")}${this.config.controlPath}`;
response.type("image/svg+xml").send(await QRCode.toString(url, { type: "svg", margin: 1 }));
} catch (error) {