| Line 41... |
Line 41... |
| 41 |
LOGGER.info("request is received after : "+request.getRequestURL().toString());
|
41 |
LOGGER.info("request is received after : "+request.getRequestURL().toString());
|
| 42 |
}
|
42 |
}
|
| 43 |
|
43 |
|
| 44 |
@Override
|
44 |
@Override
|
| 45 |
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {
|
45 |
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {
|
| 46 |
//LOGGER.info("request is received in post interceptor before [{}] with method [{}]", request.getRequestURL().toString(), request.getMethod());
|
46 |
LOGGER.info("request is received in post interceptor before [{}] with method [{}]", request.getRequestURL().toString(), request.getMethod());
|
| 47 |
if ("POST".equalsIgnoreCase(request.getMethod())) {
|
47 |
if ("POST".equalsIgnoreCase(request.getMethod())) {
|
| 48 |
String idempotencyKey = request.getHeader("IdempotencyKey");
|
48 |
String idempotencyKey = request.getHeader("IdempotencyKey");
|
| 49 |
if (idempotencyKey == null || idempotencyKey.isEmpty()) {
|
49 |
if (idempotencyKey == null || idempotencyKey.isEmpty()) {
|
| 50 |
// response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Missing idempotency token in header");
|
50 |
// response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Missing idempotency token in header");
|
| 51 |
return true;
|
51 |
return true;
|