Skip to content

Commit

Permalink
Update RestAuthenticationEntryPoint.java
Browse files Browse the repository at this point in the history
  • Loading branch information
macrozheng committed Apr 5, 2020
1 parent 6c195e8 commit 68f46c6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
public class RestAuthenticationEntryPoint implements AuthenticationEntryPoint {
@Override
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Cache-Control","no-cache");
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json");
response.getWriter().println(JSONUtil.parse(CommonResult.unauthorized(authException.getMessage())));
Expand Down

0 comments on commit 68f46c6

Please sign in to comment.