Skip to content

Commit 68f46c6

Browse files
committed
Update RestAuthenticationEntryPoint.java
1 parent 6c195e8 commit 68f46c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mall-security/src/main/java/com/macro/mall/security/component/RestAuthenticationEntryPoint.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
public class RestAuthenticationEntryPoint implements AuthenticationEntryPoint {
1919
@Override
2020
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
21+
response.setHeader("Access-Control-Allow-Origin", "*");
22+
response.setHeader("Cache-Control","no-cache");
2123
response.setCharacterEncoding("UTF-8");
2224
response.setContentType("application/json");
2325
response.getWriter().println(JSONUtil.parse(CommonResult.unauthorized(authException.getMessage())));

0 commit comments

Comments
 (0)