Skip to content

Commit 4ed7923

Browse files
committed
Fix websocket handshake issue
1 parent 6ca78ed commit 4ed7923

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/vietle/mychatapi/MychatapiApplication.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@SpringBootApplication
1010
public class MychatapiApplication {
11-
11+
1212
public static void main(String[] args) {
1313
SpringApplication.run(MychatapiApplication.class, args);
1414
}
@@ -20,6 +20,7 @@ public WebMvcConfigurer corsConfigurer() {
2020
public void addCorsMappings(CorsRegistry registry) {
2121
registry.addMapping("/**")
2222
.allowedOrigins("*")
23+
.allowedHeaders("*")
2324
.allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH", "OPTIONS");
2425
}
2526
};

0 commit comments

Comments
 (0)