Skip to content

Commit 810d25c

Browse files
committed
Add validation for http prefix
1 parent 4f98e91 commit 810d25c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

x-pack/plugins/apm/scripts/kibana-security/setup-custom-kibana-user-role.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ async function init() {
8484
return;
8585
}
8686

87+
if (
88+
!KIBANA_BASE_URL.startsWith('https://') &&
89+
!KIBANA_BASE_URL.startsWith('http://')
90+
) {
91+
console.log(
92+
'Kibana url must be prefixed with http(s):// `--kibana-url http://localhost:5601`'
93+
);
94+
return;
95+
}
96+
8797
if (!KIBANA_ROLE_SUFFIX) {
8898
console.log(
8999
'Please specify a unique suffix that will be added to your roles with `--role-suffix <suffix>` '

0 commit comments

Comments
 (0)