202509091127
API token 驗証調整
This commit is contained in:
parent
fa987caf85
commit
1b3b307621
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user