SpringSecurity6.0 #staticIgnore #web.ignoring()

기타

SpringSecurity 6.0이상에서 정적 자원 폴더 (resources/static) 보안필터 미적용(무시)하게 하기.

@Bean public WebSecurityCustomizer webSecurityCustomizer() { // return (web) -> { // web.ignoring().requestMatchers(PathRequest.toStaticResources().atCommonLocations()); // web.ignoring().antMatchers("/favicon.ico", "/resources/**", "/error"); // }; /*requestMatchers().permitAll()과 달리 보안필터 자체를 거치지 않는다.*/ return (web) -> web.ignoring() .requestMatchers("/css/**") .requestMatchers("/font/**") .req..

여웅사랑
'SpringSecurity6.0 #staticIgnore #web.ignoring()' 태그의 글 목록