package com.bcxin.filters;

import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * <b> 解决SPRINGBOOTTHE 报错VALID CHARACTERS ARE DEFINED IN RFC 7230 AND RFC 3986 </b>
 * 放开特殊字符限制
 * @author ZXF
 * @create 2021/10/20 0020 11:17
 * @version
 * @注意事项 </b>
 */
//@Configuration
public class WebConfiguration {

//    @Bean
//    public ConfigurableServletWebServerFactory webServerFactory() {
//        TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
//        factory.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> {
//            connector.setProperty("relaxedQueryChars", "[,]");
//            connector.setProperty("rejectIllegalHeader", "false");
//        });
//        return factory;
//    }
}
