Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
ASak1104 committed Jul 26, 2024
2 parents 65e3781 + 54059b3 commit 28da476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
import org.springframework.security.web.AuthenticationEntryPoint;
import team.silvertown.masil.auth.exception.AuthErrorCode;
import team.silvertown.masil.common.exception.ErrorResponse;
import team.silvertown.masil.user.exception.UserErrorCode;

@Configuration
@RequiredArgsConstructor
public class CustomAuthenticationEntryPoint implements AuthenticationEntryPoint {

private static final String APPLICATION_JSON_CHARSET_UTF_8 = "application/json;charset=UTF-8";

private final ObjectMapper objectMapper;

@Override
Expand All @@ -24,7 +25,7 @@ public void commence(
HttpServletResponse response,
AuthenticationException authException
) throws IOException {
response.setContentType("application/json;charset=UTF-8");
response.setContentType(APPLICATION_JSON_CHARSET_UTF_8);
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);

ErrorResponse errorResponse = new ErrorResponse(
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ logging:
total-size-cap: 5MB
springdoc:
swagger-ui:
enabled: false
enabled: true
sentry:
enabled: true
environment: prod
Expand Down

0 comments on commit 28da476

Please sign in to comment.