Allow tag-reader-dummy from non-localhost

This commit is contained in:
Annika Backstrom 2018-06-02 15:03:44 +00:00
parent adc365b4f8
commit 734bd6cdad

View File

@ -61,7 +61,7 @@ var html = `
console.log(uid);
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://localhost:8191/', true);
xhr.open('POST', 'http://' + document.location.host + '/', true);
xhr.setRequestHeader('Content-Type', 'application\/x-www-form-urlencoded');
xhr.send('uid=' + uid);
};
@ -91,5 +91,7 @@ app.post('/', function(req, res, next) {
server.on('request', app);
server.listen(8191, function () {
process.stderr.write('tag-reader-dummy listening at http://localhost:8191');
process.stderr.write('tag-reader-dummy listening at http://*:8191');
})
// vim:ft=javascript: