Reduce dependency on Guava (#1589)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -183,6 +183,8 @@ public class HawkbitSecurityProperties {
|
||||
*/
|
||||
public static class Clients {
|
||||
|
||||
public static final String X_FORWARDED_FOR = "X-Forwarded-For";
|
||||
|
||||
/**
|
||||
* Blacklisted client (IP addresses) for for DDI and Management API.
|
||||
*/
|
||||
@@ -191,7 +193,7 @@ public class HawkbitSecurityProperties {
|
||||
/**
|
||||
* Name of the http header from which the remote ip is extracted.
|
||||
*/
|
||||
private String remoteIpHeader = "X-Forwarded-For";
|
||||
private String remoteIpHeader = X_FORWARDED_FOR;
|
||||
|
||||
/**
|
||||
* Set to <code>true</code> if DDI clients remote IP should be stored.
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.util;
|
||||
|
||||
import static com.google.common.net.HttpHeaders.X_FORWARDED_FOR;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.reset;
|
||||
import static org.mockito.Mockito.times;
|
||||
@@ -37,6 +36,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
|
||||
@Story("IP Util Test")
|
||||
public class IpUtilTest {
|
||||
|
||||
private static final String X_FORWARDED_FOR = HawkbitSecurityProperties.Clients.X_FORWARDED_FOR;
|
||||
private static final String KNOWN_REQUEST_HEADER = "bumlux";
|
||||
|
||||
@Mock
|
||||
|
||||
Reference in New Issue
Block a user