Skip to content

Commit

Permalink
[DURACOM-288] Change logic in order to use dspaceUrl as default fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
atarix83 committed Feb 3, 2025
1 parent 855dfc3 commit c9332c2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public RootRest convert(HttpServletRequest request) {
String requestUrl = request.getRequestURL().toString();
String dspaceUrl = configurationService.getProperty("dspace.server.url");
String dspaceSSRUrl = configurationService.getProperty("dspace.server.ssr.url", dspaceUrl);
if (dspaceUrl.equals(dspaceSSRUrl) || requestUrl.startsWith(dspaceUrl)) {
rootRest.setDspaceServer(dspaceUrl);
} else {
if (!dspaceUrl.equals(dspaceSSRUrl) && requestUrl.startsWith(dspaceSSRUrl)) {
rootRest.setDspaceServer(dspaceSSRUrl);
} else {
rootRest.setDspaceServer(dspaceUrl);
}
rootRest.setDspaceVersion("DSpace " + getSourceVersion());
return rootRest;
Expand Down

0 comments on commit c9332c2

Please sign in to comment.