Skip to content

Commit

Permalink
Set response format always for Inertia reuqest
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed May 1, 2024
1 parent bed86fe commit 86c2b85
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import org.springframework.web.filter.OncePerRequestFilter;

import grails.web.http.HttpHeaders;
import grails.web.mime.MimeType;
import org.grails.web.util.GrailsApplicationAttributes;

Expand All @@ -49,8 +48,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse

@Override
protected boolean shouldNotFilter(HttpServletRequest request) {
return !(MimeType.ALL.getName().equals(request.getHeader(HttpHeaders.ACCEPT))
&& Boolean.parseBoolean(request.getHeader(InertiaRequest.X_INERTIA)));
return !Boolean.parseBoolean(request.getHeader(InertiaRequest.X_INERTIA));
}

}

0 comments on commit 86c2b85

Please sign in to comment.