pomerium/pkg/grpc/config/config.go
2021-02-03 07:15:44 -07:00

17 lines
398 B
Go

package config
// IsSet returns true if one of the route redirect options has been chosen.
func (rr *RouteRedirect) IsSet() bool {
if rr == nil {
return false
}
return rr.StripQuery != nil ||
rr.ResponseCode != nil ||
rr.PrefixRewrite != nil ||
rr.PathRedirect != nil ||
rr.PortRedirect != nil ||
rr.HostRedirect != nil ||
rr.SchemeRedirect != nil ||
rr.HttpsRedirect != nil
}