Skip to content

Commit 5fe2237

Browse files
authored
Merge pull request #495 from Team-0ops/develop
main merge
2 parents 8518c72 + 1ffb36c commit 5fe2237

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/main/java/Oops/backend/common/security/util/JwtAuthenticationFilter.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,19 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
4949
"/json",
5050
"/json/**",
5151
"/devtools/**",
52-
"/api/posts/*"
52+
"/api/posts/*",
53+
"/api/posts/*/recommendations"
5354
};
5455

5556
@Override
5657
protected boolean shouldNotFilter(HttpServletRequest request) {
5758
String path = request.getRequestURI();
5859
log.info("요청 url: "+path);
60+
61+
if ("/api/posts/my".equals(path)) {
62+
return false;
63+
}
64+
5965
for (String p : WHITELIST) {
6066
if (matcher.match(p, path)) return true;
6167
}

src/main/java/Oops/backend/config/SecurityConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http,
4848
.csrf(csrf -> csrf.disable())
4949
.cors(cors -> cors.configurationSource(corsConfigurationSource))
5050
.authorizeHttpRequests(auth -> auth
51+
.requestMatchers(HttpMethod.GET, "/api/posts/my").authenticated()
5152
.requestMatchers(
5253
"/auth/kakao/callback",
5354
"/public/**",

0 commit comments

Comments
 (0)