mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: uniproxy
This commit is contained in:
parent
40e6400b9b
commit
f781f22cde
@ -112,7 +112,9 @@ class UniProxyController extends Controller
|
||||
'push_interval' => config('v2board.server_push_interval', 60),
|
||||
'pull_interval' => config('v2board.server_pull_interval', 60)
|
||||
];
|
||||
$response['routes'] = $this->serverService->getRoutes($this->nodeInfo['route_id']);
|
||||
if ($this->nodeInfo['route_id']) {
|
||||
$response['routes'] = $this->serverService->getRoutes($this->nodeInfo['route_id']);
|
||||
}
|
||||
$eTag = sha1(json_encode($response));
|
||||
if (strpos($request->header('If-None-Match'), $eTag) !== false ) {
|
||||
abort(304);
|
||||
|
@ -218,7 +218,7 @@ class ServerService
|
||||
return $servers;
|
||||
}
|
||||
|
||||
public function getRoutes($routeIds)
|
||||
public function getRoutes(array $routeIds)
|
||||
{
|
||||
return ServerRoute::select(['id', 'match', 'action', 'action_value'])->whereIn('id', $routeIds)->get();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user