未验证 提交 d5c11ca6 编写于 作者: K kl 提交者: GitHub

Update ApolloMetaServiceConfig.java

使用DefaultHttpFirewall替换spring security默认的StrictHttpFirewall,用于解决客户端配置meta url时加上/,抛The request was rejected because the URL was not normalized.异常的问题
上级 0ac808d4
......@@ -3,10 +3,16 @@ package com.ctrip.framework.apollo.metaservice;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.security.web.firewall.DefaultHttpFirewall;
import org.springframework.security.web.firewall.HttpFirewall;
@EnableAutoConfiguration
@Configuration
@ComponentScan(basePackageClasses = ApolloMetaServiceConfig.class)
public class ApolloMetaServiceConfig {
@Bean
public HttpFirewall allowUrlEncodedSlashHttpFirewall() {
return new DefaultHttpFirewall();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册