diff --git a/src/main/java/com/spaceclub/global/config/SecurityConfig.java b/src/main/java/com/spaceclub/global/config/SecurityConfig.java new file mode 100644 index 00000000..1565ffda --- /dev/null +++ b/src/main/java/com/spaceclub/global/config/SecurityConfig.java @@ -0,0 +1,21 @@ +package com.spaceclub.global.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.Customizer; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; +import org.springframework.security.web.SecurityFilterChain; + +@Configuration +public class SecurityConfig { + + @Bean + public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { + return http + .cors(Customizer.withDefaults()) + .csrf(AbstractHttpConfigurer::disable) + .build(); + } + +}