Skip to content

Commit

Permalink
feat: cors header
Browse files Browse the repository at this point in the history
  • Loading branch information
Youthhing committed Sep 6, 2024
1 parent ec01b62 commit 7faa7f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/team/flight/backend/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedMethods("GET", "OPTIONS", "POST")
.allowedOrigins("http://localhost:3000", "https://www.chatppt.site")
.allowedHeaders("Content-Type", "Authorization", "Accept", "X-Requested-With", "Origin", "X-CSRF-Token")
.maxAge(3600L)
.allowCredentials(true);
}
}

0 comments on commit 7faa7f7

Please sign in to comment.