API any hostname

Hi,

Does kong support "_ "hyphen as hostname for all domain as nginx does?

I would like to create a load balancer which supports all domain names thus I send hosts=_ via api butI got the below message.

curl http://xxxx.aaa.com -->it is king’s ip address

{
“message”: “no Route matched with those values”
}

My config is

curl -X POST localhost:8001/upstreams --data “name=upstream_srvs”
curl -X POST localhost:8001/upstreams/upstream_srvs/targets --data “target:80=lb01a.free.beeceptor.com” --data “weight=100”
curl -X POST localhost:8001/upstreams/upstream_srvs/targets --data “target:80=lb02b.free.beeceptor.com” --data “weight=100”
curl -X POST localhost:8001/services/address2-service/routes/ --data “hosts=_”

curl -X POST localhost:8001/services/address2-service/routes/ --data-urlencode “hosts=_” --data “name=routeforall”


Hi,

Have a look at https://docs.konghq.com/1.0.x/proxy/#configuring-a-fallback-route.