Skip to content

Commit 1974c65

Browse files
Konstantin PankratovKonstantin Pankratov
authored andcommitted
Add OPTIONS to CORS
1 parent 8028e19 commit 1974c65

File tree

1 file changed

+1
-1
lines changed
  • server/src/main/java/com/studybuddies/server/configuration

1 file changed

+1
-1
lines changed

server/src/main/java/com/studybuddies/server/configuration/CORS.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class CORS {
1414
public CorsConfigurationSource cors() {
1515
CorsConfiguration conf = new CorsConfiguration();
1616
conf.setAllowedOrigins(Arrays.asList("http://localhost:3000", "http://localhost:7070"));
17-
conf.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE"));
17+
conf.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS"));
1818
conf.setAllowedHeaders(List.of("*"));
1919
conf.setAllowCredentials(true);
2020
conf.setMaxAge(3600L);

0 commit comments

Comments
 (0)