Skip to content

Commit

Permalink
allow exact match upstream host validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ikethecoder committed Feb 7, 2025
1 parent a1fc044 commit a936388
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions microservices/gatewayApi/utils/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,5 @@ def validate_upstream_host(_host, errors, allow_protected_ns, protected_kube_nam
errors.append("service upstream is invalid (e5)")
elif do_validate_upstreams and (partials[1] in perm_upstreams) is False:
errors.append("service upstream is invalid (e6)")
elif do_validate_upstreams:
# allow exact matches for upstreams that are outside of cluster
if host not in perm_upstreams:
errors.append("service upstream is invalid (e6)")
elif do_validate_upstreams and (host in perm_upstreams) is False:
errors.append("service upstream is invalid (e6)")

0 comments on commit a936388

Please sign in to comment.