diff --git a/src/withStreamingServer/convertStream.js b/src/withStreamingServer/convertStream.js index 4678b82..d5ec471 100644 --- a/src/withStreamingServer/convertStream.js +++ b/src/withStreamingServer/convertStream.js @@ -6,11 +6,11 @@ function buildProxyUrl(streamingServerURL, streamURL, requestHeaders, responseHe var parsedStreamURL = new URL(streamURL); var proxyOptions = new URLSearchParams(); proxyOptions.set('d', parsedStreamURL.origin); - Object.entries(requestHeaders).forEach(function([header, value]) { - proxyOptions.append('h', header + ':' + value); + Object.entries(requestHeaders).forEach(function(entry) { + proxyOptions.append('h', entry[0] + ':' + entry[1]); }); - Object.entries(responseHeaders).forEach(function([header, value]) { - proxyOptions.append('r', header + ':' + value); + Object.entries(responseHeaders).forEach(function(entry) { + proxyOptions.append('r', entry[0] + ':' + entry[1]); }); return url.resolve(streamingServerURL, '/proxy/' + proxyOptions.toString() + parsedStreamURL.pathname) + parsedStreamURL.search; }