diff --git a/app/Http/Controllers/V1/Server/UniProxyController.php b/app/Http/Controllers/V1/Server/UniProxyController.php index 8a132fc..2a52534 100644 --- a/app/Http/Controllers/V1/Server/UniProxyController.php +++ b/app/Http/Controllers/V1/Server/UniProxyController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers\V1\Server; +use App\Exceptions\ApiException; use App\Http\Controllers\Controller; use App\Services\ServerService; use App\Services\UserService; @@ -25,8 +26,7 @@ class UniProxyController extends Controller $this->nodeType = $request->input('node_type'); $this->nodeInfo = $this->serverService->getServer($this->nodeId, $this->nodeType); if(!$this->nodeInfo) { - Log::channel("daily")->info("$this->nodeId $this->nodeType $this->nodeInfo"); - throw new \Exception('server is not exist', 500); + throw new ApiException('server is not exist', 500); }; } diff --git a/app/Http/Controllers/V1/User/ServerController.php b/app/Http/Controllers/V1/User/ServerController.php index 2260a35..ffeec83 100644 --- a/app/Http/Controllers/V1/User/ServerController.php +++ b/app/Http/Controllers/V1/User/ServerController.php @@ -29,7 +29,6 @@ class ServerController extends Controller $data = NodeResource::collection($servers); return response([ 'data' => $data - ])->header('ETag', "\"{$eTag}\"") - ->header('Cache-Control', 'public, max-age=3600'); + ])->header('ETag', "\"{$eTag}\""); } }