Method: Controlplane#find_domain_route
- Defined in:
- lib/core/controlplane.rb
#find_domain_route(data) ⇒ Object
domain
323 324 325 326 327 328 329 330 331 |
# File 'lib/core/controlplane.rb', line 323 def find_domain_route(data) port = data["spec"]["ports"].find { |current_port| current_port["number"] == 80 || current_port["number"] == 443 } return nil if port.nil? || port["routes"].nil? route = port["routes"].find { |current_route| current_route["prefix"] == "/" } return nil if route.nil? route end |