refactor: remove IP address judgment for device management (#6275)

#### What type of PR is this?
/kind bug
/area core
/milestone 2.18.x

#### What this PR does / why we need it:
设备管理去除 IP 地址检查以避免频繁登录

#### Does this PR introduce a user-facing change?
```release-note
设备管理去除 IP 地址检查以避免频繁登录
```
pull/6277/head^2
guqing 2024-07-05 17:33:07 +08:00 committed by GitHub
parent 708b8be792
commit 36bc461147
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 4 deletions

View File

@ -100,10 +100,7 @@ public class DeviceServiceImpl implements DeviceService {
var userAgent = var userAgent =
exchange.getRequest().getHeaders().getFirst(HttpHeaders.USER_AGENT); exchange.getRequest().getHeaders().getFirst(HttpHeaders.USER_AGENT);
var deviceUa = existingDevice.getSpec().getUserAgent(); var deviceUa = existingDevice.getSpec().getUserAgent();
var ipAddr = existingDevice.getSpec().getIpAddress(); if (!StringUtils.equals(deviceUa, userAgent)) {
var clientIp = getClientIp(exchange.getRequest());
if (!StringUtils.equals(deviceUa, userAgent)
|| !StringUtils.equals(clientIp, ipAddr)) {
// User agent changed, create a new device // User agent changed, create a new device
return Mono.empty(); return Mono.empty();
} }