diff --git a/src/AgApiClient.h b/src/AgApiClient.h index 167a4eb..9f39ceb 100644 --- a/src/AgApiClient.h +++ b/src/AgApiClient.h @@ -20,7 +20,12 @@ class AgApiClient : public PrintLog { private: Configuration &config; AirGradient *ag; +#ifdef ESP8266 + // ESP8266 not support HTTPS + String apiRoot = "http://hw.airgradient.com"; +#else String apiRoot = "https://hw.airgradient.com"; +#endif bool apiRootChanged = false; // Indicate if setApiRoot() is called bool getConfigFailed;