Skip to content

Commit

Permalink
Revert "Revert "fix: include port if supplied (#86)" (#87)" (#88)
Browse files Browse the repository at this point in the history
This reverts commit 375275d.
  • Loading branch information
natedanner authored Jul 19, 2024
1 parent 375275d commit 3cae4b0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ private static String cleanOrigin(String origin) {
if (origin.startsWith("http://") || origin.startsWith("https://") || origin.startsWith("ssh://")) {
try {
final URL url = new URL(origin);
origin = url.getHost() + url.getPath();
origin = url.getHost();
if (url.getPort() != -1) {
origin += ":" + url.getPort();
}
origin += url.getPath();
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 3cae4b0

Please sign in to comment.