Skip to content

Create custom predicate based on body #3957

@RomainWilbert

Description

@RomainWilbert

I would like to redirect requests based on some information contained in the body for POST requests with XML content.

CacheRequestBodyFilter is executed after Predicates so ServerWebExchangeUtils.CACHED_REQUEST_BODY_ATTR is null at runtime. I have seen that before there was a ReadBodyPredicate but I guess it was replaced by CacheRequestBodyFilter.

The only alternative I could create a filter to do this and mutate the request to change the URI, but i don't like it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions