202509091127

API token 驗証調整
This commit is contained in:
allen.yan 2025-09-09 11:28:31 +08:00
parent fa987caf85
commit 1b3b307621

View File

@ -17,7 +17,7 @@ class ApiTokenMiddleware
}
$response = Http::withToken($token)
->withOptions(['verify' => false])
->post('https://ktv.test/api/token/validate');
->post(config('services.backend.url').'/api/token/validate');
if ($response->failed() || !$response->json('valid')) {
return response()->json(['error' => 'Invalid token'], 401);