Found that it works if you set env variable
MY_HOST_VARIABLE and config looks as:
{
"endpoint": "/__virtual/{MY_HOST_VARIABLE}/endpoint/*",
"method": "POST",
"input_headers": ["*"],
"backend": [
{
"url_pattern": "/endpoint/",
"method": "POST",
"host": [
],
"extra_config": {
"backend/http": {
"return_error_code": true
}
}
}
]
}
But krakend failing (conflict error) if you set 2 different environment host variables (
MY_HOST_VARIABLE and
MY_HOST_VARIABLE2){
"endpoint": "/__virtual/{MY_HOST_VARIABLE}/endpoint/*",
"method": "POST",
"input_headers": ["*"],
"backend": [
{
"url_pattern": "/endpoint/",
"method": "POST",
"host": [
],
"extra_config": {
"backend/http": {
"return_error_code": true
}
}
}
]
{
"endpoint": "/__virtual/{MY_HOST_VARIABLE2}/endpoint/*",
"method": "POST",
"input_headers": ["*"],
"backend": [
{
"url_pattern": "/endpoint/",
"method": "POST",
"host": [