Skip to content

Commit

Permalink
✨ [Feat] (#6) SecurityConfig 클래스 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
seonyo committed May 11, 2024
1 parent fdf6b4f commit f6c5b8b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/com/MtoM/MtoM/global/conifg/SecurityConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.MtoM.MtoM.global.conifg;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.web.SecurityFilterChain;

@Configuration
@EnableWebSecurity
public class SecurityConfig {
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws Exception{
httpSecurity
.csrf((csrf) -> csrf.disable())
.cors((cors) -> cors.disable());
return httpSecurity.build();
}
}

0 comments on commit f6c5b8b

Please sign in to comment.