Handles the URLRewrite filter from the Gateway API spec
What
This syncs the url rewrite path into the ngrok policy.
How
Call handleURLRewriteFilter when running Sync and switching in createEndpointPolicyForGateway kicked off by calculateHTTPSEdges
Setup endpoint action in createURLRewriteConfig with URLRewrite
Path Filters
Syncs the path prefix matching regex to the policy
According to Gateway docs on replacePrefixMatch this assumes usage with PathPrefix HTTPRouteMatch, and the rewrite guide examples show it ambiguously utlized without a match
For full path replace we match on an from url .* pattern and replace the full path with to
Host
On Host rewrite we handleHTTPHeaderFilterAdd with the given filter's hostname
Handles the
URLRewrite
filter from the Gateway API specWhat
This syncs the url rewrite path into the ngrok policy.
How
handleURLRewriteFilter
when runningSync
and switching increateEndpointPolicyForGateway
kicked off bycalculateHTTPSEdges
createURLRewriteConfig
withURLRewrite
Path Filters
replacePrefixMatch
this assumes usage withPathPrefix
HTTPRouteMatch, and the rewrite guide examples show it ambiguously utlized without a match.*
pattern and replace the full path withto
Host
On
Host
rewrite wehandleHTTPHeaderFilterAdd
with the given filter's hostname