@@ -0,0 +1,880 @@
+package io.pivotal;%0A%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.web.cors.CorsConfiguration;%0Aimport org.springframework.web.cors.UrlBasedCorsConfigurationSource;%0Aimport org.springframework.web.filter.CorsFilter;%0A%0A@Configuration%0Apublic class RestConfiguration %7B%0A%0A    @Bean%0A    public CorsFilter corsFilter() %7B%0A%0A        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();%0A        CorsConfiguration config = new CorsConfiguration();%0A        config.setAllowCredentials(true); // you USUALLY want this%0A        config.addAllowedOrigin(%22*%22);%0A        config.addAllowedHeader(%22*%22);%0A        config.addAllowedMethod(%22GET%22);%0A        config.addAllowedMethod(%22PUT%22);%0A        source.registerCorsConfiguration(%22/**%22, config);%0A        return new CorsFilter(source);%0A    %7D%0A%7D

allow CORS for all hosts