Skip to content

Commit

Permalink
fix: cors 원래 상태로 복구 (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdohyung committed Nov 22, 2023
1 parent 6b294be commit ecf3dd2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/backend/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public JwtAuthenticationFilter jwtAuthenticationFilter() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:3000", "https://jedero.site", "https://api.jedero.site")
.allowedOrigins("*")
.allowedMethods("*")
.allowedHeaders("*")
.exposedHeaders("*")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.springframework.security.crypto.password.PasswordEncoder;

public record JoinRequestDto(@NotBlank String password, @NotBlank String email, @NotBlank String type,
@NotBlank String typeName, @NotBlank String proofImageUrl, @NotBlank Long univId) {
@NotBlank String typeName, @NotBlank String proofImageUrl, Long univId) {
public User toEntity(PasswordEncoder passwordEncoder, University university) {
return User.builder()
.email(email)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
}

}
response.setHeader("Access-Control-Allow-Origin", "https://jedero.site");
//response.setHeader("Access-Control-Allow-Origin", "https://jedero.site");
filterChain.doFilter(request, response);
}
}

0 comments on commit ecf3dd2

Please sign in to comment.