Rewrite Prefix
EnRoute Technical Reference
On this page
EnRoute GatewayHost
provides an option to rewrite prefix. The incoming request prefix is rewritten before it is sent to upstream.
Example
Here is an example that rewrites prefix in GatewayHost
.
.
apiVersion: enroute.saaras.io/v1
kind: GatewayHost
metadata:
labels:
app: httpbin
name: httpbin-9000-gatewayhost-httpbin-host
namespace: httpbin
spec:
routes:
- conditions:
- prefix: /getget
enableWebsockets: true
prefixRewrite: /get
retryPolicy:
count: 10
perTryTimeout: 30s
services:
- name: httpbin
port: 9000
timeoutPolicy:
request: 200ms
virtualhost:
fqdn: '*'