class SmartProxyDynflowCore::Api

Constants

TASK_UPDATE_REGEXP_PATH

Private Instance Methods

callback_host(params, request) click to toggle source
# File lib/smart_proxy_dynflow_core/api.rb, line 67
def callback_host(params, request)
  params.fetch('action_input', {})['proxy_url'] ||
    request.env.values_at('HTTP_X_FORWARDED_FOR', 'HTTP_HOST').compact.first
end
launcher_class(params) click to toggle source
# File lib/smart_proxy_dynflow_core/api.rb, line 72
def launcher_class(params)
  operation = params.fetch('operation')
  if TaskLauncherRegistry.key?(operation)
    TaskLauncherRegistry.fetch(operation)
  else
    halt 404, MultiJson.dump(:error => "Unknown operation '#{operation}' requested.")
  end
end