mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 04:45:17 +00:00
working version, use corsUrl in weather providers
This commit is contained in:
@@ -111,6 +111,15 @@ const WeatherProvider = Class.extend({
|
||||
this.delegate.updateAvailable(this);
|
||||
},
|
||||
|
||||
getCorsUrl: function () {
|
||||
const url = window.config.address + ":" + window.config.port + "/cors?url=";
|
||||
if (window.config.useHttps) {
|
||||
return "https://" + url;
|
||||
} else {
|
||||
return "http://" + url;
|
||||
}
|
||||
},
|
||||
|
||||
// A convenience function to make requests. It returns a promise.
|
||||
fetchData: function (url, method = "GET", data = null) {
|
||||
const getData = function (mockData) {
|
||||
|
Reference in New Issue
Block a user