fix weather tests and add CHANGELOG

This commit is contained in:
Karsten Hassel 2022-01-26 00:22:32 +01:00
parent c622db918b
commit 59bc2318f8
2 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -112,11 +112,15 @@ const WeatherProvider = Class.extend({
}, },
getCorsUrl: function () { getCorsUrl: function () {
const url = window.config.address + ":" + window.config.port + "/cors?url="; if (this.config.mockData) {
if (window.config.useHttps) { return "";
return "https://" + url;
} else { } else {
return "http://" + url; const url = window.config.address + ":" + window.config.port + "/cors?url=";
if (window.config.useHttps) {
return "https://" + url;
} else {
return "http://" + url;
}
} }
}, },