[refactor] adjust the API to permit configuration directive that can be used both at global and host level