diff --git a/dspace-api/src/main/java/org/dspace/authenticate/ShibAuthentication.java b/dspace-api/src/main/java/org/dspace/authenticate/ShibAuthentication.java index d23c934f3a..3cf7ec8876 100644 --- a/dspace-api/src/main/java/org/dspace/authenticate/ShibAuthentication.java +++ b/dspace-api/src/main/java/org/dspace/authenticate/ShibAuthentication.java @@ -516,10 +516,7 @@ public class ShibAuthentication implements AuthenticationMethod else returnURL = "http://"; - returnURL += host; - if (!(port == 443 || port == 80)) - returnURL += ":" + port; - returnURL += "/" + contextPath + "/shibboleth-login"; + returnURL += request.getHeader("Referer"); try { shibURL += "?target="+URLEncoder.encode(returnURL, "UTF-8");