mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Little Tweeks
This commit is contained in:
1 parent
50bd53561e
commit
5647bb21a7
3 files changed
+47
-39
No files matched your search
@@ -12,7 +12,7 @@ class UpdatesApi {
|
||||
private function validateHeader($headers){
|
||||
if (
|
||||
isset($_SERVER['HTTP_X_ESP8266_STA_MAC']) &&
|
||||
isset($_SERVER['HTTP_X_ESP8266_SKETCH_MD5'])
|
||||
isset($_SERVER['HTTP_X_ESP8266_SKETCH_MD5'])
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
@@ -23,9 +23,14 @@ class UpdatesApi {
|
||||
$logManager = new LogManager('../logs/ota/'. date("Y-m-d").'.log');
|
||||
$logManager->setLevel(LOGLEVEL);
|
||||
$logManager->write("[Updater] Client Connected", LogRecordTypes::INFO);
|
||||
|
||||
|
||||
// if($this->validateHeader($_SERVER)){
|
||||
// header($_SERVER["SERVER_PROTOCOL"]." 400 Bad Header");
|
||||
// die();
|
||||
// }
|
||||
|
||||
header('Content-type: text/plain; charset=utf8', true);
|
||||
|
||||
|
||||
//Filtrování IP adress
|
||||
if (DEBUGMOD != 1) {
|
||||
if (!in_array($_SERVER['REMOTE_ADDR'], HOMEIP)) {
|
||||
|
||||
Reference in new issue
Block a user