Merge commit from fork

* fix: sanitize host headers before use

* add additional test
This commit is contained in:
Livio Spring
2025-10-29 10:05:37 +01:00
committed by GitHub
parent f4503e07cd
commit 72a5c33e6a
10 changed files with 157 additions and 32 deletions
+4 -1
View File
@@ -28,7 +28,10 @@ type Instance interface {
}
type InstanceVerifier interface {
InstanceByHost(ctx context.Context, host, publicDomain string) (Instance, error)
// InstanceByHost returns the instance for the given instanceDomain or publicDomain.
// Previously it used the host (hostname[:port]) to find the instance, but is now using the domain (hostname) only.
// For preventing issues in backports, the name of the method is not changed.
InstanceByHost(ctx context.Context, instanceDomain, publicDomain string) (Instance, error)
InstanceByID(ctx context.Context, id string) (Instance, error)
}