1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

fix(k8s/ns): validate ingress ctrl host pattern (#5663)

* fix(k8s/ns): validate ingress ctrl host pattern

* feat(kube/ns): validate ingress hostname
This commit is contained in:
Chaim Lev-Ari 2021-09-24 14:02:06 +03:00 committed by GitHub
parent 7d40a83d03
commit db04bc9f38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -221,6 +221,7 @@
ng-model="item.Host"
ng-change="ctrl.onChangeIngressHostname()"
placeholder="foo"
pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
required
/>
</div>
@ -240,6 +241,11 @@
>
<ng-messages for="resourcePoolEditForm['hostname_' + ic.IngressClass.Name + '_' + $index].$error">
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Hostname is required.</p>
<p ng-message="pattern">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
This field must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g.
'example.com').
</p>
</ng-messages>
<p ng-if="item.Duplicate">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>