From 21b5be64e98598d166ff2c7d9eb8e3e696c8f164 Mon Sep 17 00:00:00 2001 From: mox <10431012+moezakura@users.noreply.github.com> Date: Sun, 28 Jun 2020 04:43:44 +0900 Subject: [PATCH] #225 add set User-Agent when downloading song. --- src/actions/queueActions.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/actions/queueActions.js b/src/actions/queueActions.js index 9e03d45..91abe80 100644 --- a/src/actions/queueActions.js +++ b/src/actions/queueActions.js @@ -57,7 +57,10 @@ export const downloadSong = (identity) => (dispatch, getState) => { }) let req = request.get({ url: `${BEATSAVER_BASE_URL}${song.downloadURL}`, - encoding: null + encoding: null, + headers: { + 'user-agent': window.navigator.userAgent + } }, (err, r, data) => { try { // eslint-disable-next-line