Open whbg opened 6 years ago
region=us-east-1 environment=test
eureka.name=zuul
eureka.port=7001
eureka.vipAddress=${eureka.name}:${eureka.port}
eureka.preferSameZone=false
eureka.registration.enabled=false
eureka.validateInstanceId=false
zuul.filters.root=zuul-sample/src/main/groovy/com/netflix/zuul/sample/filters zuul.filters.locations=${zuul.filters.root}/inbound,${zuul.filters.root}/outbound,${zuul.filters.root}/endpoint zuul.filters.packages=com.netflix.zuul.filters.common
eureka.shouldUseDns=true eureka.eurekaServer.context=discovery/v2 eureka.eurekaServer.domainName=discovery${environment}.netflix.net eureka.eurekaServer.gzipContent=true
eureka.serviceUrl.default=http://${region}.${eureka.eurekaServer.domainName}:7001/${eureka.eurekaServer.context}
eureka.shouldFetchRegistry=false
api.ribbon.UseIPAddrForServer=false api.ribbon.client.NIWSServerListClassName=com.netflix.loadbalancer.ConfigurationBasedServerList ##{diff} api.ribbon.DeploymentContextBasedVipAddresses=api-test.netflix.net:7001
Which host header are you getting on your backend?
configuration is , api.ribbon.listOfServers=http://xx.com:80 backend Host header is Host:localhost:7001(it should be Host:xx.com:80)
That's not how proxies are supposed to behave. You have to maintain the host header from the original request otherwise your service has no idea where the request came from.
I think it's better if the proxy overrides the host header to get the host from ribbon.listOfServers? @artgon
And so? how to fix this problem?
I have the same problem. @artgon please help to solve this.
If you want to change the outbound host header, you can add a filter that modifies the inbound request headers.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Condition: 1.disable eureka, and then 2.choose ConfigurationBasedServerList
We found this error was relation to 'Host' header forward to real service. Or i did incorrect configuration(see below bold line)?