Skip to content

Commit

Permalink
Fix #15
Browse files Browse the repository at this point in the history
  • Loading branch information
tma02 authored Mar 13, 2017
1 parent 25daf3f commit b9637e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const https = require('https');
const SERVER_PORT = 5000;
const UPDATE_INTERVAL = 1000;
const DEFAULT_RETURN_ON = ['login', 'logout', 'play', 'pause', 'error', 'ap'];
const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36';
let spotifyPortOffset = 0;
const DEFAULT_HTTPS_CONFIG = {
host: '',
Expand Down Expand Up @@ -136,6 +137,8 @@ function getUrl(path) {
}

function getJson(config, callback) {
config.headers = config.headers || {};
config.headers['User-Agent'] = USER_AGENT;
var port = config.port;
https.get(config, function(res) {
var body = '';
Expand Down

0 comments on commit b9637e4

Please sign in to comment.