Привет, я использую перехватчик java и хочу определить IP-адрес клиента, который вызвал API
Спецификация Open API
paths:
/test:
get:
description: ""
operationId: PING
x-wso2-disable-security: true
x-wso2-throttling-tier: 6PerMin
x-wso2-request-interceptor: java:org.mgw.interceptor.IDSAuthInterceptor
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/PING"
application/xml:
schema:
$ref: "#/components/schemas/PING"
security:
- basicAuthentication: []
Java Перехватчик
public class IDSAuthInterceptor implements Interceptor {
public boolean interceptRequest(Caller caller, Request request) {
// How to determine client ip. Not able to fetch using {Caller caller, Request request}
}
}