Skip to content

Envoy doesn't add headers in case of Gateway Timeout #4317

@pugachAG

Description

@pugachAG

Description:

Envoy doesn't add headers specified in the route configuration in case of upstream timeout.

Repro steps:

Send request to upstream which doesn't respond within specified route timeout.

Expected: envoy adds headers specified under response_headers_to_add

Actual: envoy doesn't add any headers:

          'server' => 'envoy',
          'content-length' => '24',
          'Reason' => 'Gateway Timeout',
          'URL' => 'http://authxserver.service/infra_test/idempotent',
          'HTTPVersion' => '1.1',
          'content-type' => 'text/plain',
          'date' => 'Fri, 31 Aug 2018 13:21:31 GMT',
          'Status' => 504

route config:

    {
     "match": {
      "regex": "^/(infra_test/idempotent|/iam/issue-refresh-token|identity/user-exists/.*)"
     },
     "route": {
      "cluster": "authxserver.prod.cluster",
      "timeout": "0.500s",
      "retry_policy": {
       "retry_on": "5xx",
       "num_retries": 2,
       "per_try_timeout": "0.150s"
      },
      "response_headers_to_add": [
       {
        "header": {
         "key": "x-envoy-authxserver-endpoint-type",
         "value": "3"
        }
       }
      ]
     }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions