mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
fix weather tests and add CHANGELOG
This commit is contained in:
parent
c622db918b
commit
59bc2318f8
@ -14,6 +14,7 @@ _This release is scheduled to be released on 2022-04-01._
|
|||||||
- Added a config option under the weather module, absoluteDates, providing an option to format weather forecast date output with either absolute or relative dates.
|
- Added a config option under the weather module, absoluteDates, providing an option to format weather forecast date output with either absolute or relative dates.
|
||||||
- Added test for new weather forecast absoluteDates porperty.
|
- Added test for new weather forecast absoluteDates porperty.
|
||||||
- The modules get a class hidden added/removed if they get hidden/shown
|
- The modules get a class hidden added/removed if they get hidden/shown
|
||||||
|
- Added internal cors proxy to get weather providers working without public proxies (fixes #2714). The new url `http(s)://address:port/cors?url=https://whatever-to-proxy` can be used in other modules too.
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
||||||
|
@ -112,12 +112,16 @@ const WeatherProvider = Class.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getCorsUrl: function () {
|
getCorsUrl: function () {
|
||||||
|
if (this.config.mockData) {
|
||||||
|
return "";
|
||||||
|
} else {
|
||||||
const url = window.config.address + ":" + window.config.port + "/cors?url=";
|
const url = window.config.address + ":" + window.config.port + "/cors?url=";
|
||||||
if (window.config.useHttps) {
|
if (window.config.useHttps) {
|
||||||
return "https://" + url;
|
return "https://" + url;
|
||||||
} else {
|
} else {
|
||||||
return "http://" + url;
|
return "http://" + url;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// A convenience function to make requests. It returns a promise.
|
// A convenience function to make requests. It returns a promise.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user