Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸš€ Prod ν™˜κ²½ API 곡개 λ²”μœ„ μ„€μ • #165

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading