The Lab 3 data transformation example never shows custom HTML from RouteTable below. The rate limit rule is apparently never triggered. It just keeps showing the "successful" result.
# cat files/rt-transformation.yaml
apiVersion: gateway.solo.io/v1
kind: RouteTable
metadata:
name: httpbin-routetable
namespace: team1
labels:
application-owner: team1
spec:
routes:
# -------- Rate limit at route level requires to give a name -------
- name: "not-secured"
# ------------------------------------------------------------------
matchers:
- prefix: /not-secured
options:
prefixRewrite: '/'
# -------- Rate limit as you saw before ------------
ratelimitBasic:
anonymousLimits:
requestsPerUnit: 5
unit: MINUTE
# --------------------------------------------------
# ---------------- Transformation ------------------
transformations:
responseTransformation:
transformationTemplate:
parseBodyBehavior: DontParse
body:
text: '{% if header(":status") == "429" %}<html><body style="background-color:powderblue;"><h1>Too many Requests!</h1><p>Try again after 1 minute</p></body></html>{% else %}{{ body() }}{% endif %}'
#---------------------------------------------------
routeAction:
single:
upstream:
name: team1-httpbin-8000
namespace: gloo-system
The Lab 3 data transformation example never shows custom HTML from RouteTable below. The rate limit rule is apparently never triggered. It just keeps showing the "successful" result.