mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
fix: use host with potential port for instance context (#7022)
This commit is contained in:
parent
a87f54b328
commit
6f3afb810d
@ -111,7 +111,7 @@ func hostFromOrigin(ctx context.Context) (host string, err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
host = u.Hostname()
|
host = u.Host
|
||||||
if host == "" {
|
if host == "" {
|
||||||
err = errors.New("empty host")
|
err = errors.New("empty host")
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ func Test_setInstance(t *testing.T) {
|
|||||||
r.Header.Set("host", "fromrequest")
|
r.Header.Set("host", "fromrequest")
|
||||||
return r.WithContext(zitadel_http.WithComposedOrigin(r.Context(), "https://fromorigin:9999"))
|
return r.WithContext(zitadel_http.WithComposedOrigin(r.Context(), "https://fromorigin:9999"))
|
||||||
}(),
|
}(),
|
||||||
verifier: &mockInstanceVerifier{"fromorigin"},
|
verifier: &mockInstanceVerifier{"fromorigin:9999"},
|
||||||
headerName: "host",
|
headerName: "host",
|
||||||
},
|
},
|
||||||
res{
|
res{
|
||||||
|
Loading…
Reference in New Issue
Block a user