You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many thanks for the sample project - very helpful in learning how to use RSockets.
How do I add CORS configuration - lets say to the Radars Controller to restrict the requests to come from an allowed origins ?
I tried @CrossOrigin and it does not work and I also tried adding the following but does not work. If RSocket via websockets doesnt support CORS configuration then it would be harder for security sensitive applications from adopting rsocket.
Hi Brian
Many thanks for the sample project - very helpful in learning how to use RSockets.
How do I add CORS configuration - lets say to the Radars Controller to restrict the requests to come from an allowed origins ?
I tried
@CrossOrigin
and it does not work and I also tried adding the following but does not work. If RSocket via websockets doesnt support CORS configuration then it would be harder for security sensitive applications from adopting rsocket.@Bean
CorsConfigurationSource corsConfiguration() {
CorsConfiguration corsConfig = new CorsConfiguration();
corsConfig.applyPermitDefaultValues();
corsConfig.addAllowedMethod(HttpMethod.PUT);
corsConfig.addAllowedMethod(HttpMethod.DELETE);
corsConfig.setAllowedOrigins(Arrays.asList(FRONTEND_LOCALHOST, FRONTEND_STAGING));
UrlBasedCorsConfigurationSource source =
new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", corsConfig);
return source;
}
The text was updated successfully, but these errors were encountered: