lib/falcon/command/virtual.rb in falcon-0.31.0 vs lib/falcon/command/virtual.rb in falcon-0.32.0

- old
+ new

@@ -36,11 +36,11 @@ require 'rack/server' module Falcon module Command class Virtual < Samovar::Command - self.description = "Run an HTTP server with one or more virtual hosts." + self.description = "Run one or more virtual hosts with a front-end proxy." options do option '--bind-insecure <address>', "Bind redirection to the given hostname/address", default: "http://[::]" option '--bind-secure <address>', "Bind proxy to the given hostname/address", default: "https://[::]" end @@ -61,9 +61,17 @@ def call container = run(parent.verbose?) container.wait + end + + def insecure_endpoint + Async::HTTP::Endpoint.parse(@options[:bind_insecure]) + end + + def secure_endpoint + Async::HTTP::Endpoint.parse(@options[:bind_secure]) end end end end