Several improvements
This commit is contained in:
+2
-1
@@ -57,7 +57,8 @@ module.exports = NodeHelper.create({
|
||||
);
|
||||
this.expressApp.get("/MMM-NextcloudCookbook/qr.svg", async (request, response, next) => {
|
||||
try {
|
||||
const url = `${request.protocol}://${request.get("host")}${this.config.controlPath}`;
|
||||
const 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) {
|
||||
next(error);
|
||||
|
||||
Reference in New Issue
Block a user