Skip to content

Commit

Permalink
Merge branch 'apolloconfig:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
klboke authored Jun 21, 2022
2 parents 0101a3f + 7d25d55 commit 21dd30c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Apollo 2.1.0
* [feat(apollo-client): the spi of config service load balancer client](https://github.com/apolloconfig/apollo/pull/4394)
* [add cat-client as optional dependency](https://github.com/apolloconfig/apollo/pull/4414)
* [refactor Functions class with lambda](https://github.com/apolloconfig/apollo/pull/4419)
* [fix:occur a 400 error request when openapi key's parameter contain "a[0]"](https://github.com/apolloconfig/apollo/pull/4424)
------------------
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/11?closed=1)
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,30 @@
*/
package com.ctrip.framework.apollo.openapi;

import com.ctrip.framework.apollo.common.controller.WebMvcConfig;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@EnableAutoConfiguration
@Configuration
@ComponentScan(basePackageClasses = PortalOpenApiConfig.class)
public class PortalOpenApiConfig {

@Component
static class PortalWebMvcConfig extends WebMvcConfig {
@Override
public void customize(TomcatServletWebServerFactory factory) {
final String relaxedChars = "<>[\\]^`{|}";
final String tomcatRelaxedpathcharsProperty = "relaxedPathChars";
final String tomcatRelaxedquerycharsProperty = "relaxedQueryChars";
factory.addConnectorCustomizers(connector -> {
connector.setProperty(tomcatRelaxedpathcharsProperty, relaxedChars);
connector.setProperty(tomcatRelaxedquerycharsProperty, relaxedChars);
});
}
}
}

0 comments on commit 21dd30c

Please sign in to comment.