Method: DigitalFabric::AgentProxy#route

Defined in:
lib/tipi/digital_fabric/agent_proxy.rb

#routeObject



79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/tipi/digital_fabric/agent_proxy.rb', line 79

def route
  case @req.headers['df-mount']
  when /^\s*host\s*=\s*([^\s]+)/
    { host: Regexp.last_match(1) }
  when /^\s*path\s*=\s*([^\s]+)/
    { path: Regexp.last_match(1) }
  when /catch_all/
    { catch_all: true }
  else
    nil
  end
end