Skip to content

Commit

Permalink
Fixed caching request body
Browse files Browse the repository at this point in the history
  • Loading branch information
galovics committed Sep 17, 2024
1 parent ca3f69d commit 0cc6353
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 91 deletions.
2 changes: 1 addition & 1 deletion fineract-provider/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ dependencies {
implementation ('jakarta.xml.bind:jakarta.xml.bind-api') {
exclude group: 'jakarta.activation'
}
implementation ('org.apache.activemq:activemq-client-jakarta') {
implementation ('org.apache.activemq:activemq-client') {
exclude group: 'org.apache.geronimo.specs'
exclude group: 'javax.annotation', module: 'javax.annotation-api'
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
import lombok.RequiredArgsConstructor;
import org.apache.fineract.cob.conditions.LoanCOBEnabledCondition;
import org.apache.fineract.infrastructure.core.data.ApiGlobalErrorResponse;
import org.apache.fineract.infrastructure.core.http.BodyCachingHttpServletRequestWrapper;
import org.apache.fineract.infrastructure.jobs.exception.LoanIdsHardLockedException;
import org.apache.fineract.useradministration.exception.UnAuthenticatedUserException;
import org.apache.http.HttpStatus;
import org.springframework.context.annotation.Conditional;
import org.springframework.web.filter.OncePerRequestFilter;
import org.springframework.web.util.ContentCachingRequestWrapper;

@RequiredArgsConstructor
@Conditional(LoanCOBEnabledCondition.class)
Expand Down Expand Up @@ -63,7 +63,7 @@ public void toServletResponse(HttpServletResponse response) throws IOException {
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
request = new BodyCachingHttpServletRequestWrapper(request);
request = new ContentCachingRequestWrapper(request);

if (!helper.isOnApiList(request)) {
proceed(filterChain, request, response);
Expand Down

0 comments on commit 0cc6353

Please sign in to comment.