Skip to content

Clarify documentation of RequestHeaderModifier .set and .add behaviour #3314

Open
@FredrikAugust

Description

@FredrikAugust

What would you like to be added:

The documentation for set currently reads:

To edit an existing header, use the set action and specify the value of the header to be modified and the new header value to be set.

However, according to the implementation by Traefik it actually sets it regardless of it exists or not. Go playground

This also goes for the add functionality, which according to the implementation in Traefik will add values iteratively, i.e. if an incoming request already has header x-header set to value and you add the add filter with value2 the actual header value will be value,value2. This is just a clarification I think could be useful to add.

If this is a wrong implementation by Traefik then let me know and I'll move the issue over there.

Why this is needed:

To avoid confusion when using the filters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/documentationCategorizes issue or PR as related to documentation.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions