Skip to content

Commit

Permalink
🔥 删除 PigRequestGlobalFilter 中无用引入
Browse files Browse the repository at this point in the history
  • Loading branch information
lltx committed Apr 4, 2024
1 parent b6cafce commit 93bfb7e
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@

import com.pig4cloud.pig.common.core.constant.CommonConstants;
import com.pig4cloud.pig.common.core.constant.SecurityConstants;
import com.pig4cloud.pig.common.core.util.SpringContextHolder;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.core.Ordered;
import org.springframework.core.env.Environment;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.util.StringUtils;
import org.springframework.web.server.ServerWebExchange;
Expand Down Expand Up @@ -57,8 +55,6 @@ public class PigRequestGlobalFilter implements GlobalFilter, Ordered {
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {

Environment environment = SpringContextHolder.getApplicationContext().getEnvironment();

// 1. 清洗请求头中from 参数
ServerHttpRequest request = exchange.getRequest().mutate().headers(httpHeaders -> {
httpHeaders.remove(SecurityConstants.FROM);
Expand Down

0 comments on commit 93bfb7e

Please sign in to comment.