| | |
| | | import org.springframework.core.io.buffer.DataBuffer; |
| | | import org.springframework.core.io.buffer.DataBufferUtils; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.server.reactive.ServerHttpRequest; |
| | | import org.springframework.http.server.reactive.ServerHttpRequestDecorator; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | if(method != HttpMethod.POST){ |
| | | return chain.filter(exchange.mutate().request(mutate.build()).build()); |
| | | } |
| | | MediaType contentType = request.getHeaders().getContentType(); |
| | | if (contentType != null && MediaType.MULTIPART_FORM_DATA.isCompatibleWith(contentType)) { |
| | | return chain.filter(exchange.mutate().request(mutate.build()).build()); |
| | | } |
| | | // 跳过不需要验证的路径 |
| | | String url = request.getURI().getPath(); |
| | | if (StringUtils.matches(url, ignoreWhite.getWhites())) { |