Skip to content
Snippets Groups Projects
Verified Commit 12273034 authored by Damien's avatar Damien
Browse files

FEAT #13694 TIME 0:15 Uri instead of ip

parent 8bb50918
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ if (is_file($file)) { ...@@ -27,7 +27,7 @@ if (is_file($file)) {
} }
$jsonFile[] = [ $jsonFile[] = [
'id' => (string)$value->custom_id, 'id' => (string)$value->custom_id,
'ip' => $ip, 'uri' => $ip,
'path' => (string)$value->path 'path' => (string)$value->path
]; ];
} }
......
...@@ -63,8 +63,8 @@ class AuthenticationController ...@@ -63,8 +63,8 @@ class AuthenticationController
if (!empty($jsonFile[0]['path'])) { if (!empty($jsonFile[0]['path'])) {
$coreUrl = UrlController::getCoreUrl(); $coreUrl = UrlController::getCoreUrl();
$url = $coreUrl . $jsonFile[0]['path'] . "/dist/index.html"; $url = $coreUrl . $jsonFile[0]['path'] . "/dist/index.html";
} elseif (!empty($jsonFile[0]['ip'])) { } elseif (!empty($jsonFile[0]['uri'])) {
$url = $jsonFile[0]['ip'] . "/dist/index.html"; $url = $jsonFile[0]['uri'] . "/dist/index.html";
} }
return $response->withJson(['url' => $url]); return $response->withJson(['url' => $url]);
......
...@@ -46,7 +46,7 @@ class CoreConfigModel ...@@ -46,7 +46,7 @@ class CoreConfigModel
if (!empty($value['path']) && $value['path'] == $path) { if (!empty($value['path']) && $value['path'] == $path) {
$customId = $value['id']; $customId = $value['id'];
return $customId; return $customId;
} elseif ($value['ip'] == $_SERVER['HTTP_HOST'] || ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR'] && $value['ip'] == $_SERVER['SERVER_ADDR'])) { } elseif ($value['uri'] == $_SERVER['HTTP_HOST'] || ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR'] && $value['uri'] == $_SERVER['SERVER_ADDR'])) {
$customId = $value['id']; $customId = $value['id'];
return $customId; return $customId;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment