go
go copied to clipboard
Enabling Horizon to configure Resource Root's Host
What problem does your feature solve?
I am using Horizon on Kubernetes. Currently, Horizon references the Host header to determine the Host name of the Resource Root. Therefore, Horizon in my environment shows the resource path by Host name in the Kubernetes cluster.
Kubernetes DNS uses the Host header for DNS resolution, so it is not possible to resolve by explicitly specifying the Host header.
I would like to add a setting to allow Host configuration.
What would you like to see?
Below is the response of Horizon in my environment.
> curl -X GET https://mydomain.com/
{
"_links": {
"account": {
"href": "https://horizon-svc-name.default.svc.cluster.local/accounts/{account_id}",
"templated": true
},
"accounts": {
"href": "https://horizon-svc-name.default.svc.cluster.local/accounts{?signer,sponsor,asset,liquidity_pool,cursor,limit,order}",
"templated": true
},
....
}
Specifying the Host header would look like this
> curl -X GET --header "Host: newdomain.com" https://mydomain.com/
Not Found
What alternatives are there?
I think the good and simple way is to add a Config parameter