@Test void testGetCORSConfig() throws Exception { final TrellisConfiguration config = new YamlConfigurationFactory<>(TrellisConfiguration.class, Validators.newValidator(), Jackson.newMinimalObjectMapper(), "") .build(new File(getClass().getResource("/config1.yml").toURI())); assertNotNull(TrellisUtils.getCorsConfiguration(config), "CORS configuration is missing!"); config.getCors().setEnabled(false); assertNull(TrellisUtils.getCorsConfiguration(config), "CORS config persists after disabling it!"); }
public static CORSConfiguration getCorsConfiguration(final TrellisConfiguration config) { if (config.getCors().getEnabled()) { return config.getCors(); } return null; }
TrellisUtils { public static CORSConfiguration getCorsConfiguration(final TrellisConfiguration config) { if (config.getCors().getEnabled()) { return config.getCors(); } return null; } }
TrellisUtils { public static CORSConfiguration getCorsConfiguration(final TrellisConfiguration config) { if (config.getCors().getEnabled()) { return config.getCors(); } return null; } private  TrellisUtils(); }
TrellisUtils { public static CORSConfiguration getCorsConfiguration(final TrellisConfiguration config) { if (config.getCors().getEnabled()) { return config.getCors(); } return null; } private  TrellisUtils(); static Authenticator getJwtAuthenticator(final JwtAuthConfiguration config); static WebAcService getWebacService(final TrellisConfiguration config,
            final ResourceService resourceService); static List<ContainerRequestFilter> getAuthFilters(final TrellisConfiguration config); static String buildChallenge(final String scheme, final String realm, final String scope); static CORSConfiguration getCorsConfiguration(final TrellisConfiguration config); }
TrellisUtils { public static CORSConfiguration getCorsConfiguration(final TrellisConfiguration config) { if (config.getCors().getEnabled()) { return config.getCors(); } return null; } private  TrellisUtils(); static Authenticator getJwtAuthenticator(final JwtAuthConfiguration config); static WebAcService getWebacService(final TrellisConfiguration config,
            final ResourceService resourceService); static List<ContainerRequestFilter> getAuthFilters(final TrellisConfiguration config); static String buildChallenge(final String scheme, final String realm, final String scope); static CORSConfiguration getCorsConfiguration(final TrellisConfiguration config);  }