// policy attempts to find a policy for a request. If a policy is successfully matched,
// it returns the policy information and a bool value of `true`. If a policy can not be matched,
// a nil value for the policy and false bool value is returned.
policy attempts to find a policy for a request. If a policy is successfully matched,
it returns the policy information and a bool value of `true`. If a policy can not be matched,
a nil value for the policy and false bool value is returned.
// policy attempts to find a policy for a request . If a policy is successfully matched // it returns the policy information and a bool value of ` true ` . If a policy can not be matched // a nil value for the policy and false bool value is returned .
func (p *Proxy) policy(r *http.Request) (*policy.Policy, bool) {
	config, ok := p.routeConfigs[r.Host]
	if ok {
		return config.policy, true
	}
	return nil, false
}
func ( p * Proxy ) policy ( r * http . Request ) ( * policy . Policy , bool ) { config , ok := p . routeConfigs [ r . Host ] if ok { return config . policy , true } return nil , false }
policy attempts to find a policy for a request.
policy attempts to find a policy for a request .