Merge branch 'feature/gongfu' into feature/data-permission
This commit is contained in:
commit
1509b20788
|
|
@ -18,6 +18,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Set;
|
||||
|
||||
@Slf4j
|
||||
@Order(0)
|
||||
|
|
@ -26,10 +27,16 @@ public class AppVersionFilter extends OncePerRequestFilter {
|
|||
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
/**
|
||||
* 因前端部分接口遗漏App-Version参数,ios打包重新审核需要很久,所以需要排除掉,否则会导致接口无法访问
|
||||
*/
|
||||
private static final Set<String> WHITE_LIST = Set.of("getTicket", "uploadSingleFile", "getInfoById");
|
||||
|
||||
private static final String MIN_SUPPER_VERSION = "1.0.9";
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws IOException, ServletException {
|
||||
if (WHITE_LIST.stream().noneMatch(path -> request.getRequestURI().endsWith(path))) {
|
||||
String appPlatform = request.getHeader("App-Platform");
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
if (StrUtil.isBlank(appPlatform)) {
|
||||
|
|
@ -52,6 +59,7 @@ public class AppVersionFilter extends OncePerRequestFilter {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void out(HttpServletResponse response, ApiResult result) throws IOException {
|
||||
response.setContentType(MediaType.APPLICATION_JSON_VALUE);
|
||||
|
|
|
|||
Loading…
Reference in New Issue