mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Add device menu
This commit is contained in:
1 parent
0efbda0583
commit
6b0ab2d0ba
14 files changed
+4984
-398
No files matched your search
+13
-3
@@ -9,13 +9,23 @@ class UpdatesApi {
|
||||
readfile($path);
|
||||
}
|
||||
|
||||
private function validateHeader($headers){
|
||||
if (
|
||||
isset($_SERVER['HTTP_X_ESP8266_STA_MAC']) &&
|
||||
isset($_SERVER['HTTP_X_ESP8266_SKETCH_MD5'])
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function default(){
|
||||
header('Content-type: text/plain; charset=utf8', true);
|
||||
$logManager = new LogManager('../logs/ota/'. date("Y-m-d").'.log');
|
||||
$logManager->setLevel(LOGLEVEL);
|
||||
$logManager->write("[Updater] Client Connected", LogRecordTypes::INFO);
|
||||
|
||||
|
||||
|
||||
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