Skip to content

Commit 15ddec7

Browse files
fix cors config
1 parent 3244a5d commit 15ddec7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/src/main/java/com/caesarjlee/caesarfinancialtracker/configurations/SecurityConfiguration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws
3636
.authorizeHttpRequests(
3737
authentication
3838
-> authentication
39-
.requestMatchers(HttpMethod.POST, "/profiles/register", "/profiles/login")// public endpoints
39+
.requestMatchers(HttpMethod.OPTIONS, "/**")
40+
.permitAll()
41+
.requestMatchers(HttpMethod.POST, "/api/alpha/profiles/register", "/api/alpha/profiles/login")// public endpoints
4042
.permitAll()
4143
.anyRequest()// everything else requires JWT
4244
.authenticated())

0 commit comments

Comments
 (0)