Search code examples
kongkong-plugin

Why does Kong need headers host whenever request?


I do not understand why Kong required to include host = userApi.test in Headers
when GET localhost:8000/api/v1/test is requested.

Are there any ways not to include the Headers when requested?

For example, I am using Angular to request APIs through Kong, I always need to include that host?

enter image description here


Solution

  • I found the solution!

    https://discuss.konghq.com/t/setup-for-one-service-without-host-header/805

    DO NOT INCLUDE hosts[] when create a route.