Open Jyustin opened 9 months ago
fetch works local-local now, the following line was changed in securityconfig.java:
@Bean public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); configuration.setAllowedOrigins(Arrays.asList("https://y2kcoders.github.io/","http://127.0.0.1:4100")); // Add other allowed origins if // needed configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); configuration.setAllowedHeaders(Arrays.asList("Content-Type", "Authorization", "x-csrf-token")); configuration.setAllowCredentials(true); // Allow credentials UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/**", configuration); return source; }
I added local origin to setAllowedOrigins
delete also works local-local, will push changes
still doesn't work
deployed-local delete works though, so I know frontend matter is NOT the problem, problem lies in aws backend deployment
delete now works. line was changed in nginx config file.
changed the allowed-origin to our specific frontend instead of * wildcard.