Skip to content

Commit 2eab5d6

Browse files
committed
Print has to be aware of the application host
1 parent 9fea4fe commit 2eab5d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/print.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ router.post('/api/print', function (req, response) {
3131
return;
3232
}
3333

34-
let host = "http://127.0.0.1:3000";
34+
let host = q.applicationHost.replace(`https://`, `http://`);
3535
let url = host + '/app/' + q.db + '/' + q.schema + '/' + (q.queryString !=="" ? q.queryString : "?") + '&tmpl=' + q.tmpl + '.tmpl&l=' + q.legend + '&h=' + q.header + '&px=' + q.px + '&py=' + q.py + '&td=' + q.dateTime+ '&d=' + q.date + '&k=' + key + '&t=' + q.title + '&c=' + q.comment + q.anchor;
3636
console.log(`Printing ` + url);
3737

0 commit comments

Comments
 (0)