@Test public void testIntegrationMetricsFilterRegistration() { FilterRegistrationBean bean = registration.integrationMetricsFilterRegistration(); assertNotNull(bean); assertNotNull(bean.getInitParameters()); assertFalse(bean.getInitParameters().isEmpty()); Map<String, String> params = bean.getInitParameters(); assertTrue(params.values().contains(URL_PATTERN_WEBHOOK)); assertTrue(params.values().contains(URL_PATTERN_METRICS)); }
@Bean public FilterRegistrationBean integrationMetricsFilterRegistration() { IntegrationMetricsFilter filter = new IntegrationMetricsFilter(); FilterRegistrationBean registration = new FilterRegistrationBean(filter); registration.setUrlPatterns(Collections.singletonList(baseUrlMapping())); registration.addInitParameter(IntegrationMetricsFilter.IGNORE_URL_PARAM, BASE_API_PATH + METRICS_PATH); registration.addInitParameter(IntegrationMetricsFilter.WEBHOOK_URL_PARAM, WebHookOriginCheckFilter.URL_PATTERN); return registration; }
WebResourcesRegistration { @Bean public FilterRegistrationBean integrationMetricsFilterRegistration() { IntegrationMetricsFilter filter = new IntegrationMetricsFilter(); FilterRegistrationBean registration = new FilterRegistrationBean(filter); registration.setUrlPatterns(Collections.singletonList(baseUrlMapping())); registration.addInitParameter(IntegrationMetricsFilter.IGNORE_URL_PARAM, BASE_API_PATH + METRICS_PATH); registration.addInitParameter(IntegrationMetricsFilter.WEBHOOK_URL_PARAM, WebHookOriginCheckFilter.URL_PATTERN); return registration; } }
WebResourcesRegistration { @Bean public FilterRegistrationBean integrationMetricsFilterRegistration() { IntegrationMetricsFilter filter = new IntegrationMetricsFilter(); FilterRegistrationBean registration = new FilterRegistrationBean(filter); registration.setUrlPatterns(Collections.singletonList(baseUrlMapping())); registration.addInitParameter(IntegrationMetricsFilter.IGNORE_URL_PARAM, BASE_API_PATH + METRICS_PATH); registration.addInitParameter(IntegrationMetricsFilter.WEBHOOK_URL_PARAM, WebHookOriginCheckFilter.URL_PATTERN); return registration; }  }
WebResourcesRegistration { @Bean public FilterRegistrationBean integrationMetricsFilterRegistration() { IntegrationMetricsFilter filter = new IntegrationMetricsFilter(); FilterRegistrationBean registration = new FilterRegistrationBean(filter); registration.setUrlPatterns(Collections.singletonList(baseUrlMapping())); registration.addInitParameter(IntegrationMetricsFilter.IGNORE_URL_PARAM, BASE_API_PATH + METRICS_PATH); registration.addInitParameter(IntegrationMetricsFilter.WEBHOOK_URL_PARAM, WebHookOriginCheckFilter.URL_PATTERN); return registration; }  @Bean FilterRegistrationBean webhookCheckOriginFilterRegistration(); @Bean FilterRegistrationBean webhookTracingFilterRegistration(); @Bean FilterRegistrationBean integrationMetricsFilterRegistration(); @Bean ServletRegistrationBean apiServletRegistration(WebApplicationContext context,
      MultipartProperties multipartProperties); @Bean WebMvcConfigurer corsConfigurer(); }
WebResourcesRegistration { @Bean public FilterRegistrationBean integrationMetricsFilterRegistration() { IntegrationMetricsFilter filter = new IntegrationMetricsFilter(); FilterRegistrationBean registration = new FilterRegistrationBean(filter); registration.setUrlPatterns(Collections.singletonList(baseUrlMapping())); registration.addInitParameter(IntegrationMetricsFilter.IGNORE_URL_PARAM, BASE_API_PATH + METRICS_PATH); registration.addInitParameter(IntegrationMetricsFilter.WEBHOOK_URL_PARAM, WebHookOriginCheckFilter.URL_PATTERN); return registration; }  @Bean FilterRegistrationBean webhookCheckOriginFilterRegistration(); @Bean FilterRegistrationBean webhookTracingFilterRegistration(); @Bean FilterRegistrationBean integrationMetricsFilterRegistration(); @Bean ServletRegistrationBean apiServletRegistration(WebApplicationContext context,
      MultipartProperties multipartProperties); @Bean WebMvcConfigurer corsConfigurer();  }