Skip to content

Commit

Permalink
[playframework#1288] http.path and Secure module
Browse files Browse the repository at this point in the history
  • Loading branch information
pepite committed May 10, 2012
1 parent 8831b0b commit 5f97b46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/secure/app/controllers/Secure.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class Secure extends Controller {
static void checkAccess() throws Throwable {
// Authent
if(!session.contains("username")) {
flash.put("url", "GET".equals(request.method) ? request.url : "/"); // seems a good default
flash.put("url", "GET".equals(request.method) ? request.url : Play.ctxPath + "/"); // seems a good default
login();
}
// Checks
Expand Down Expand Up @@ -110,7 +110,7 @@ static void redirectToOriginalURL() throws Throwable {
Security.invoke("onAuthenticated");
String url = flash.get("url");
if(url == null) {
url = "/";
url = Play.ctxPath + "/";
}
redirect(url);
}
Expand Down

0 comments on commit 5f97b46

Please sign in to comment.