[api] 파일업로드 공개
This commit is contained in:
@@ -59,7 +59,10 @@ public class SecurityConfig {
|
|||||||
.cors(Customizer.withDefaults())
|
.cors(Customizer.withDefaults())
|
||||||
.csrf(csrf -> csrf.disable())
|
.csrf(csrf -> csrf.disable())
|
||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
.requestMatchers("/admin/auth/**").permitAll()
|
.requestMatchers(
|
||||||
|
"/admin/auth/**"
|
||||||
|
, "/admin/files/**"
|
||||||
|
).permitAll()
|
||||||
.anyRequest().hasRole("ADMIN")
|
.anyRequest().hasRole("ADMIN")
|
||||||
)
|
)
|
||||||
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
|
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
|
||||||
@@ -78,7 +81,17 @@ public class SecurityConfig {
|
|||||||
.accessDeniedHandler(new JwtAccessDeniedHandler())
|
.accessDeniedHandler(new JwtAccessDeniedHandler())
|
||||||
)
|
)
|
||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
.requestMatchers("/", "/actuator/health", "/sso/**", "/auth/**", "/user/signup", "/user/migrationUserList", "/tusFiles/tusHook", "/tusFiles/uploadAuth").permitAll()
|
.requestMatchers(
|
||||||
|
"/"
|
||||||
|
, "/actuator/health"
|
||||||
|
, "/sso/**"
|
||||||
|
, "/auth/**"
|
||||||
|
, "/user/signup"
|
||||||
|
, "/user/migrationUserList"
|
||||||
|
, "/tusFiles/tusHook"
|
||||||
|
, "/tusFiles/uploadAuth"
|
||||||
|
, "/files/**"
|
||||||
|
).permitAll()
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
)
|
)
|
||||||
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
|
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user