mirror of
https://github.com/v2board/v2board.git
synced 2025-01-27 00:19:10 +08:00
fix server rules empty
This commit is contained in:
parent
5ee6fc2996
commit
bfeab8eae2
@ -146,7 +146,7 @@ class DeepbworkController extends Controller
|
|||||||
if ($server->rules) {
|
if ($server->rules) {
|
||||||
$rules = json_decode($server->rules);
|
$rules = json_decode($server->rules);
|
||||||
// domain
|
// domain
|
||||||
if (isset($rules->domain)) {
|
if (isset($rules->domain) && !empty($rules->domain)) {
|
||||||
$domainObj = new \StdClass();
|
$domainObj = new \StdClass();
|
||||||
$domainObj->type = 'field';
|
$domainObj->type = 'field';
|
||||||
$domainObj->domain = $rules->domain;
|
$domainObj->domain = $rules->domain;
|
||||||
@ -154,7 +154,7 @@ class DeepbworkController extends Controller
|
|||||||
array_push($json->routing->rules, $domainObj);
|
array_push($json->routing->rules, $domainObj);
|
||||||
}
|
}
|
||||||
// protocol
|
// protocol
|
||||||
if (isset($rules->protocol)) {
|
if (isset($rules->protocol) && !empty($rules->protocol)) {
|
||||||
$protocolObj = new \StdClass();
|
$protocolObj = new \StdClass();
|
||||||
$protocolObj->type = 'field';
|
$protocolObj->type = 'field';
|
||||||
$protocolObj->protocol = $rules->protocol;
|
$protocolObj->protocol = $rules->protocol;
|
||||||
|
@ -137,7 +137,7 @@ class PoseidonController extends Controller
|
|||||||
if ($server->rules) {
|
if ($server->rules) {
|
||||||
$rules = json_decode($server->rules);
|
$rules = json_decode($server->rules);
|
||||||
// domain
|
// domain
|
||||||
if (isset($rules->domain)) {
|
if (isset($rules->domain) && !empty($rules->domain)) {
|
||||||
$domainObj = new \StdClass();
|
$domainObj = new \StdClass();
|
||||||
$domainObj->type = 'field';
|
$domainObj->type = 'field';
|
||||||
$domainObj->domain = $rules->domain;
|
$domainObj->domain = $rules->domain;
|
||||||
@ -145,7 +145,7 @@ class PoseidonController extends Controller
|
|||||||
array_push($json->routing->rules, $domainObj);
|
array_push($json->routing->rules, $domainObj);
|
||||||
}
|
}
|
||||||
// protocol
|
// protocol
|
||||||
if (isset($rules->protocol)) {
|
if (isset($rules->protocol) && !empty($rules->protocol)) {
|
||||||
$protocolObj = new \StdClass();
|
$protocolObj = new \StdClass();
|
||||||
$protocolObj->type = 'field';
|
$protocolObj->type = 'field';
|
||||||
$protocolObj->protocol = $rules->protocol;
|
$protocolObj->protocol = $rules->protocol;
|
||||||
|
Loading…
Reference in New Issue
Block a user