Skip to content

Commit

Permalink
use relative path for socket.io fix #1934
Browse files Browse the repository at this point in the history
  • Loading branch information
Legion2 committed Feb 18, 2020
1 parent be07ff2 commit 7b56817
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Fix regression in currentweather module causing 'undefined' to show up when config.hideTemp is false
- Fix FEELS translation for Croatian
- Fixed weather tests [#1840](https://github.com/MichMich/MagicMirror/issues/1840)
- Fixed Socket.io can't be used with Reverse Proxy in serveronly mode [#1934](https://github.com/MichMich/MagicMirror/issues/1934)

### Updated
- Remove documentation from core repository and link to new dedicated docs site: [docs.magicmirror.builders](https://docs.magicmirror.builders).
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div class="region bottom right"><div class="container"></div></div>
</div>
<div class="region fullscreen above"><div class="container"></div></div>
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script type="text/javascript" src="socket.io/socket.io.js"></script>
<script type="text/javascript" src="vendor/node_modules/nunjucks/browser/nunjucks.min.js"></script>
<script type="text/javascript" src="js/defaults.js"></script>
<script type="text/javascript" src="#CONFIG_FILE#"></script>
Expand Down
4 changes: 3 additions & 1 deletion js/socketclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ var MMSocket = function(moduleName) {
self.moduleName = moduleName;

// Private Methods
self.socket = io("/" + self.moduleName);
self.socket = io("/" + self.moduleName, {
path: window.location.pathname + "/socket.io"
});
var notificationCallback = function() {};

var onevent = self.socket.onevent;
Expand Down

0 comments on commit 7b56817

Please sign in to comment.