Merge pull request #1976 from Legion2/develop

Added basename config
This commit is contained in:
Michael Teeuw 2020-04-06 21:55:10 +02:00 committed by GitHub
commit 3f8363a5b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -9,12 +9,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
*This release is scheduled to be released on 2020-07-01.*
# Added
### Added
# Updated
### Updated
# Deleted
### Deleted
### Fixed
- The broken modules due to Socket.io change from last release [#1973](https://github.com/MichMich/MagicMirror/issues/1973)
## [2.11.0] - 2020-04-01

View File

@ -15,6 +15,8 @@ var config = {
// - "0.0.0.0", "::" to listen on any interface
// Default, when address config is left out or empty, is "localhost"
port: 8080,
basePath: "/", // The URL path where MagicMirror is hosted. If you are using a Reverse proxy
// you must set the sub path here. basePath must end with a /
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],

View File

@ -15,6 +15,7 @@ if (typeof(mmPort) !== "undefined") {
var defaults = {
address: address,
port: port,
basePath: "/",
kioskmode: false,
electronOptions: {},
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],

View File

@ -9,7 +9,7 @@ var MMSocket = function(moduleName) {
// Private Methods
self.socket = io("/" + self.moduleName, {
path: window.location.pathname + "socket.io"
path: config.basePath + "socket.io"
});
var notificationCallback = function() {};