diff --git a/src/API.cpp b/src/API.cpp index f436716..cabc41d 100644 --- a/src/API.cpp +++ b/src/API.cpp @@ -42,7 +42,11 @@ namespace fw String API::get_url_base() { +#ifdef ESP8266 return "https://" + this->api_ip + ":" + this->api_port; +#else + return "http://" + this->api_ip + ":" + this->api_port; +#endif } ok_t API::setup_auth(const char *username, const char *password) @@ -68,7 +72,7 @@ namespace fw { return AUTHENTICATED; } - this->json_message_response("unauthorised", 403); + this->json_message_response("unauthorized", 403); return DENIED; }