class Conjur::WebServer::APIProxy::Request
Public Class Methods
new(env)
click to toggle source
Calls superclass method
# File lib/conjur/webserver/api_proxy.rb, line 8 def initialize env path = env["PATH_INFO"] path =~ /^\/([^\/]+)(.*)/ app = $1 path_remainder = $2 new_url = case app when 'authn', 'authz', 'audit', 'pubkeys' [ Conjur.configuration.send("#{app}_url"), path_remainder ].join else [ Conjur.configuration.send("core_url"), path ].join end if query = env["QUERY_STRING"] new_url = [ new_url, query ].join('?') end super new_url.to_s, Rack::Request.new(env) end