From e1f910861cf07b2a299b966fd4c5a6e0479aa3f9 Mon Sep 17 00:00:00 2001 From: Shishir Suman <shishir.suman@tarento.com> Date: Thu, 21 Dec 2023 19:13:49 +0530 Subject: [PATCH] temp fix for RequestInterceptor --- .../upsmf/examsAndAdmissions/RequestInterceptor.java | 6 ++++++ src/main/resources/application.properties | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/com/tarento/upsmf/examsAndAdmissions/RequestInterceptor.java b/src/main/java/com/tarento/upsmf/examsAndAdmissions/RequestInterceptor.java index 9080e50..d42d82d 100644 --- a/src/main/java/com/tarento/upsmf/examsAndAdmissions/RequestInterceptor.java +++ b/src/main/java/com/tarento/upsmf/examsAndAdmissions/RequestInterceptor.java @@ -26,9 +26,15 @@ public class RequestInterceptor extends BaseController implements HandlerInterce @Value("${user.management.exam.fee.auth.token}") private String userManagementAuthToken; + @Value("${request.interceptor.enabled}") + private String isInterceptorEnabled; + @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + if("true".equalsIgnoreCase(isInterceptorEnabled)) { + return Boolean.TRUE; + } if(request.getRequestURI().endsWith("login")) { return Boolean.TRUE; } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index e2dab25..4e898de 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -122,3 +122,5 @@ spring.mail.username=upsmf.otp@upsmfac.org spring.mail.password= spring.mail.properties.mail.smtp.auth=true spring.mail.properties.mail.smtp.starttls.enable=true + +request.interceptor.enabled=true -- GitLab