Skip to content

Conversation

@futujaos
Copy link
Collaborator

@futujaos futujaos commented Feb 4, 2026

No description provided.

if routerHeaderValue, ok := httpAttrs.Headers[routerHeaderName]; ok {
hash = routerHeaderValue
} else if host := httpAttrs.Host; host != "" {
hash = strings.Split(host, ".")[0]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho, domain prefix has a higher priority than header

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or we should fail if there is both a domain prefix and a header (especially if they are different)

Copy link
Collaborator Author

@futujaos futujaos Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Host is always present in httpAttrs, since we make request to task proxy with some FQDN
last else clause is unreachable in practice, unless someone passes empty Host header value directly

@futujaos futujaos merged commit 98d1f80 into main Feb 4, 2026
2 checks passed
@futujaos futujaos deleted the route-by-custom-header branch February 4, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants