274
// redirection conditions can be checked at once. If either of those methods are updated, this should
275
// be kept in sync.
276
>
func (c *operationContext) shouldForwardRequest(ctx context.Context, header nexus.Header) bool {
nexus_handler.go
277
>
redirectHeader := header.Get(interceptor.DCRedirectionContextHeaderName)
278
>
redirectAllowed, err := strconv.ParseBool(redirectHeader)
279
>
if err != nil {
280
>
redirectAllowed = true
281
>
}
282
>
return redirectAllowed &&
283
>
c.redirectionInterceptor.RedirectionAllowed(ctx) &&
284
>
c.namespace.IsGlobalNamespace() &&
285
>
c.forwardingEnabledForNamespace(c.namespaceName)
286
}
287