mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-09-02 19:04:42 +00:00
修改登录失效返回值code401
之前返回的code200,前端就会$message一下错误信息,不会弹出401重新登录跳转的弹框。
This commit is contained in:
@@ -95,7 +95,7 @@ public class AuthFilter implements GlobalFilter, Ordered
|
||||
|
||||
return response.writeWith(Mono.fromSupplier(() -> {
|
||||
DataBufferFactory bufferFactory = response.bufferFactory();
|
||||
return bufferFactory.wrap(JSON.toJSONBytes(R.fail(msg)));
|
||||
return bufferFactory.wrap(JSON.toJSONBytes(R.fail(HttpStatus.UNAUTHORIZED.value(), msg)));
|
||||
}));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user