mirror of
				https://github.com/v2board/v2board.git
				synced 2025-11-01 01:41:47 +08:00 
			
		
		
		
	update: uniproxy
This commit is contained in:
		| @@ -112,7 +112,9 @@ class UniProxyController extends Controller | |||||||
|             'push_interval' => config('v2board.server_push_interval', 60), |             'push_interval' => config('v2board.server_push_interval', 60), | ||||||
|             'pull_interval' => config('v2board.server_pull_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)); |         $eTag = sha1(json_encode($response)); | ||||||
|         if (strpos($request->header('If-None-Match'), $eTag) !== false ) { |         if (strpos($request->header('If-None-Match'), $eTag) !== false ) { | ||||||
|             abort(304); |             abort(304); | ||||||
|   | |||||||
| @@ -218,7 +218,7 @@ class ServerService | |||||||
|         return $servers; |         return $servers; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public function getRoutes($routeIds) |     public function getRoutes(array $routeIds) | ||||||
|     { |     { | ||||||
|         return ServerRoute::select(['id', 'match', 'action', 'action_value'])->whereIn('id', $routeIds)->get(); |         return ServerRoute::select(['id', 'match', 'action', 'action_value'])->whereIn('id', $routeIds)->get(); | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user