solo-io / gloo

The Feature-rich, Kubernetes-native, Next-Generation API Gateway Built on Envoy
https://docs.solo.io/
Apache License 2.0
4.04k stars 431 forks source link

New transformationTemplate for queryParams #4891

Open antonioberben opened 3 years ago

antonioberben commented 3 years ago

Is your feature request related to a problem? Please describe. It is a bit complicted to create transformations about queryParams

Probably a new transformationTemplate would be interesting.

The US would be something like: Me, as an ops, I can create a transformation to handle my queryParams so that I can move, either a key or a value, from header to the query parameters, and vice-versa.

Describe the solution you'd like A clear and concise description of what you want to happen.

For example:

GET /endpoint -H header1:value1

To become:

GET /endpoint?header1=value1

And:

GET /endpoint?header1=value1

To become:

GET /endpoint?header1=value1 -H header1:value1

Or:

GET /endpoint -H header1:value1

Describe alternatives you've considered There were two possible alternatives:

Both are not quite handy

Additional context Add any other context or screenshots about the feature request here.

bcollard commented 3 years ago

What about adding a new addQueryParam param under TransformationTemplate with map<string, .envoy.api.v2.filter.http.InjaTemplate> This new option would check if there is a question mark in the path and append if it's not the case.

github-actions[bot] commented 3 months ago

This issue has been marked as stale because of no activity in the last 180 days. It will be closed in the next 180 days unless it is tagged "no stalebot" or other activity occurs.