Skip to content

Commit 1e0830b

Browse files
Merge pull request quarkusio#47787 from melloware/devui-agroal-jdbc-fix
DevUI DatabaseView improve JDBC host resolution
2 parents 382cf44 + 4a95818 commit 1e0830b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extensions/agroal/deployment/src/main/resources/dev-ui/qwc-agroal-datasource.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,11 +730,12 @@ export class QwcAgroalDatasource extends QwcHotReloadElement {
730730
}
731731
}
732732

733-
const urlPattern = /^jdbc:[^:]+:\/\/([^:/]+)(:\d+)?/;
733+
const urlPattern = /\/\/([^:/?#]+)|@([^:/?#]+)/;
734734
const match = jdbcUrl.match(urlPattern);
735735

736736
if (match) {
737-
const host = match[1];
737+
// match[1] is for //host, match[2] is for @host
738+
const host = match[1] || match[2];
738739
if(host === "localhost" || host === "127.0.0.1" || host === "::1"){
739740
return true;
740741
}

0 commit comments

Comments
 (0)