修改原有框架中英文映射
This commit is contained in:
@@ -27,10 +27,10 @@ class CheckLogin implements MiddlewareInterface
|
||||
try {
|
||||
$token = JwtToken::getExtend();
|
||||
} catch (\Throwable $e) {
|
||||
throw new ApiException('您的登录凭证错误或者已过期,请重新登录', 401);
|
||||
throw new ApiException('Your login credential is invalid or expired, please login again', 401);
|
||||
}
|
||||
if ($token['plat'] !== 'saiadmin') {
|
||||
throw new ApiException('登录凭证校验失败');
|
||||
throw new ApiException('Login credential verification failed');
|
||||
}
|
||||
// 一次合并设置,避免 setHeader 覆盖导致只保留最后一个
|
||||
$request->setHeader(array_merge($request->header() ?: [], [
|
||||
|
||||
Reference in New Issue
Block a user