Skip to content

enhancement: support request body matching in Gateway API and ApisixRoute #399

@kayx23

Description

@kayx23

Summary

Please triage whether the controller should support request body matching for routing.

Current behavior

APISIX itself supports body-aware matching through route vars / expression-based conditions, including request body derived values such as post_arg_*, but the current controller models do not expose an equivalent surface.

From the current API model:

  • ApisixRouteHTTPMatchExprSubject.Scope supports Header, Query, and Path
  • there is no request body scope in the route match expression model
  • Gateway API integration also does not expose request body matching through the current controller model

As a result, body-based routing use cases supported by APISIX cannot currently be expressed through the controller.

Use cases affected

  • routing based on fields in POST form or JSON request bodies
  • expressing body-based match conditions through ApisixRoute or Gateway API instead of falling back to a separate APISIX configuration path

Code context

  • api/v2/apisixroute_types.go
  • api/v2/shared_types.go

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions