Skip to content

Commit

Permalink
v5.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
IrosTheBeggar committed Jun 7, 2021
1 parent f82060b commit 774ba9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mstream",
"version": "5.1.3",
"version": "5.1.5",
"description": "music streaming server",
"main": "cli-boot-wrapper.js",
"bin": {
Expand Down
3 changes: 1 addition & 2 deletions src/api/federation.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ exports.setup = (mstream) => {
}
});

apiProxy.on('error', function (err, req, res) {
apiProxy.on('error', (err, req, res) => {
res.writeHead(500, { 'Content-Type': 'text/plain' });
res.end('Something went wrong. And we are reporting a custom error message.');
});
Expand All @@ -213,7 +213,6 @@ exports.setup = (mstream) => {
try {
// Add the auth token as a cookie so all contents of the iframe use it
if (req.token) { res.cookie('x-access-token', req.token); }
// TODO: This can crash the program if the target is incorrect
apiProxy.web(req, res, {target: 'http://' + sync.getUiAddress(), changeOrigin: true});
} catch (err) {
winston.error('Syncthing Proxy Error', { stack: err });
Expand Down

0 comments on commit 774ba9e

Please sign in to comment.