@@ -39,7 +39,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
3939 .requestMatchers ("/api/sign-up" , "/api/sign/up/helper" , "/api/sign/in" , "http://3.37.158.7:8080/" , "http://3.37.158.7:8080" , "http://localhost:8080/" ).permitAll ()
4040// .requestMatchers("/api/**").permitAll()
4141 .requestMatchers ("/api/sign/**" ).permitAll ()
42- .requestMatchers ("/" ).permitAll ()
42+ .requestMatchers ("/api " ).permitAll ()
4343 .requestMatchers ("/api/token/**" ).permitAll ()
4444 .requestMatchers ("/swagger-resources/**" , "/swagger-ui/**" , "/v3/api-docs/**" ).permitAll ()
4545 .requestMatchers ("/img/**" , "/css/**" , "/static/js/**" , "/docs/**" ).permitAll ()
@@ -59,8 +59,11 @@ public BCryptPasswordEncoder passwordEncoder() {
5959 public CorsConfigurationSource corsConfigurationSource () {
6060 final CorsConfiguration config = new CorsConfiguration ();
6161
62- config .setAllowedOriginPatterns (Arrays .asList ("*" ));
63- config .setAllowedMethods (Arrays .asList ("GET" , "POST" , "PUT" , "DELETE" , "OPTIONS" ));
62+ config .setAllowedOrigins (Arrays .asList (
63+ "http://3.37.158.7" ,
64+ "http://3.37.158.7:80" ,
65+ "http://localhost:5173"
66+ )); config .setAllowedMethods (Arrays .asList ("GET" , "POST" , "PUT" , "DELETE" , "OPTIONS" ));
6467 config .setAllowedHeaders (Arrays .asList ("Authorization" , "Cache-Control" , "Content-Type" ));
6568 config .setExposedHeaders (Arrays .asList ("*" ));
6669 config .setAllowCredentials (true );
0 commit comments