|
67 | 67 | import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
68 | 68 | import org.springframework.security.web.util.matcher.OrRequestMatcher;
|
69 | 69 | import org.springframework.security.web.util.matcher.RequestMatcher;
|
70 |
| -import org.springframework.util.CollectionUtils; |
71 | 70 | import org.springframework.web.cors.CorsConfiguration;
|
72 | 71 | import org.springframework.web.servlet.DispatcherServlet;
|
73 | 72 |
|
@@ -125,8 +124,8 @@ public CloudFoundryWebEndpointServletHandlerMapping cloudFoundryWebEndpointServl
|
125 | 124 | allEndpoints.addAll(webEndpoints);
|
126 | 125 | allEndpoints.addAll(servletEndpointsSupplier.getEndpoints());
|
127 | 126 | allEndpoints.addAll(controllerEndpointsSupplier.getEndpoints());
|
128 |
| - return new CloudFoundryWebEndpointServletHandlerMapping(new EndpointMapping("/cloudfoundryapplication"), |
129 |
| - webEndpoints, endpointMediaTypes, getCorsConfiguration(), securityInterceptor, allEndpoints); |
| 127 | + return new CloudFoundryWebEndpointServletHandlerMapping(new EndpointMapping(BASE_PATH), webEndpoints, |
| 128 | + endpointMediaTypes, getCorsConfiguration(), securityInterceptor, allEndpoints); |
130 | 129 | }
|
131 | 130 |
|
132 | 131 | private CloudFoundrySecurityInterceptor getSecurityInterceptor(RestTemplateBuilder restTemplateBuilder,
|
@@ -189,9 +188,7 @@ public void customize(WebSecurity web) {
|
189 | 188 | .forEach((path) -> requestMatchers.add(new AntPathRequestMatcher(path + "/**")));
|
190 | 189 | requestMatchers.add(new AntPathRequestMatcher(BASE_PATH));
|
191 | 190 | requestMatchers.add(new AntPathRequestMatcher(BASE_PATH + "/"));
|
192 |
| - if (!CollectionUtils.isEmpty(requestMatchers)) { |
193 |
| - web.ignoring().requestMatchers(new OrRequestMatcher(requestMatchers)); |
194 |
| - } |
| 191 | + web.ignoring().requestMatchers(new OrRequestMatcher(requestMatchers)); |
195 | 192 | }
|
196 | 193 |
|
197 | 194 | }
|
|
0 commit comments