Skip to content
Permalink
Browse files

Fix config repo cloning

This broke during 18.6, likely as part of the spring upgrade

Fixes #5013
  • Loading branch information...
ketan committed Aug 31, 2018
1 parent 884acc5 commit dfa0d2212669e32a404c477306abef64b5adf415
@@ -36,7 +36,7 @@ public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain
public void init(FilterConfig config) throws ServletException {
ConfigRepository configRepository = ContextLoader.getCurrentWebApplicationContext().getBean(ConfigRepository.class);
FileResolver<HttpServletRequest> resolver = new FileResolver<>();
resolver.exportRepository("config-repository", configRepository.getGitRepo());
resolver.exportRepository("api/config-repository.git", configRepository.getGitRepo());
setRepositoryResolver(resolver);
setReceivePackFactory(null);

@@ -68,6 +68,11 @@
<url-pattern>/*</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>ConfigGitRepositoryFilter</filter-name>
<url-pattern>/api/config-repository.git/*</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>urlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -215,11 +220,6 @@
<url-pattern>/console-websocket/*</url-pattern>
</servlet-mapping>

<filter-mapping>
<filter-name>ConfigGitRepositoryFilter</filter-name>
<url-pattern>/api/config-repository.git/*</url-pattern>
</filter-mapping>

<servlet-mapping>
<servlet-name>spring-all</servlet-name>
<url-pattern>/*</url-pattern>

0 comments on commit dfa0d22

Please sign in to comment.
You can’t perform that action at this time.