Skip to content

Allow to use body_format in direct_response #39463

@ldb

Description

@ldb

I would like to request that format strings (config.core.v3.SubstitutionFormatString) be supported inside a direct_response action for the router.

Right now it is only possible to provide hardcoded constant strings (from various sources) as the body for a direct_response action. However, it would be nice to be able to compose a response body from metadata provided by previous filters for example.

The custom_response filter already supports this using the localResponsePolicy but it requires to add another filter to the filter chain which does not easily give the same granularity of being invoked only for certain routes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/httpenhancementFeature requests. Not bugs or questions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions