Skip to content

Commit

Permalink
Merge branch 'devel' into dbeaver/pro#1441-websocket-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
kseniaguzeeva authored Oct 1, 2024
2 parents 05a5794 + 3fbc227 commit c8d58d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public String getSignInLink() throws DBException {
}

private String buildRedirectUrl(String baseUrl) {
return baseUrl + "?" + CBAuthConstants.CB_REDIRECT_URL_REQUEST_PARAM + "=" + WebAppUtils.getWebApplication().getServerURL();
return baseUrl + "?" + CBAuthConstants.CB_REDIRECT_URL_REQUEST_PARAM + "=" + WebAppUtils.getFullServerUrl();
}

@Property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

import java.nio.file.Path;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class WebAppUtils {
private static final Log log = Log.getLog(WebAppUtils.class);
Expand Down Expand Up @@ -269,4 +271,13 @@ private static void flattenArray(Object[] array, Map<String, Object> result, Str
}
}

@NotNull
public static String getFullServerUrl() {
WebApplication application = WebAppUtils.getWebApplication();
return Stream.of(application.getServerURL(), application.getRootURI())
.map(WebAppUtils::removeSideSlashes)
.filter(CommonUtils::isNotEmpty)
.collect(Collectors.joining("/"));
}

}

0 comments on commit c8d58d9

Please sign in to comment.