0

I have a kong gateway inside a docker compose. I only use two path in my kong service (/general and /authorization). When i access other route, it falls to an error "Kong Error, no Route matched with those values. I want to change the default error page to my static html page.

I have add a plugins response-transformer and i use curl to hit the api to configure the response transformer plugin.

curl -X PUT "http://kong:8001/plugins/796a77c3-5497-49a8-8892-f9830bcb6dda" -d '{"name": "response-transformer","config": {  "add": {"headers": ["Content-Type: text/html"], "body": {"404": "'"$STATIC_HTML_CONTENT_404"'", "500": "'"$STATIC_HTML_CONTENT_500"'"}}}}'

but it returns an error {"code":2,"message":"schema violation (name: required field missing)","fields":{"name":"required field missing"},"name":"schema violation"}. Can you help me to figured it out why this is happened? Or maybe there are wrong step to assign the static html to replace the kong default error page to my static html page? I'm also using konga as my kong GUI if there better step to configure this using konga.

Thank you for helping! :D

0 Answers0