diff --git a/src/main/java/org/b3log/symphony/processor/ApiProcessor.java b/src/main/java/org/b3log/symphony/processor/ApiProcessor.java index 7b493a5d..bb519d63 100644 --- a/src/main/java/org/b3log/symphony/processor/ApiProcessor.java +++ b/src/main/java/org/b3log/symphony/processor/ApiProcessor.java @@ -142,7 +142,11 @@ public void loginWebInApiKey(final RequestContext context) { if (null != currentUser) { final Response response = context.getResponse(); - response.sendRedirect(Latkes.getServePath()); + String r = context.param("r"); + if (null == r) { + r = "/"; + } + response.sendRedirect(Latkes.getServePath() + r); Sessions.login(response, currentUser.optString(Keys.OBJECT_ID), true); } else { context.renderJSON(StatusCodes.ERR).renderMsg("ApiKey 错误。");