Skip to content

Allow removal of the x-envoy-ratelimited header #7034

@edheliel

Description

@edheliel

Description:

Use Case: I want to disable x-envoy-ratelimited header which is being set when a request is rate limited, as I do not need it and it doesn't really bring additional information about the ratelimit (correct me if that header is needed for something else).

Problem:

  1. I tried the approach of removing the header using a HTTPRoute filter but the header doesn't get removed, which I am not entirely sure why, as the documentation mentions, that in the default filter chain the header modification filter is executed after the ratelimit one (which supposedly sets the header). My other assumption is that the filter set in the HTTPRoute can't re-write the header, as this is not a response from a service that is being intercepted, but that response is generate by a call to the ratelimit service, which potentially bypasses the response modification filters?

  2. I found that the fiter.ratelimit does have an option to disable setting the header (linked the PR below), but that option is not exposed & it seems the only way to enable it is to use EnvoyPatchPolicy which is not something my organisation wants to use due to it's instability

  3. There is the possibility to disable all x-envoy-* headers, but I don't want to disable all of the headers just this one.

  4. The ratelimit service does have the option to add custom headers, but the x-envoy-ratelimited seems to not be set in it.

Solution:

  • Add a configuration option that would allow disabling the x-envoy-ratelimited filter without using EnvoyPatchPolicy

[optional Relevant Links:]

PR that added disabling the header in the filter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions