chore: support configurable api port
This commit is contained in:
@@ -125,7 +125,10 @@ class MaterialLocalResourceService
|
||||
}
|
||||
|
||||
if (!in_array(strtolower((string)($_ENV['APP_ENV'] ?? '')), ['production', 'prod'], true)) {
|
||||
return 'http://' . '127.0.0.' . '1:8787';
|
||||
$port = filter_var($_ENV['APP_PORT'] ?? '', FILTER_VALIDATE_INT, [
|
||||
'options' => ['min_range' => 1, 'max_range' => 65535],
|
||||
]) ?: 8787;
|
||||
return 'http://' . '127.0.0.' . '1:' . $port;
|
||||
}
|
||||
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user