HTTP redirects in Kong OSS are tough. They require two plugins to be enabled:
- kong-request-termination to setup the 30X HTTP code
- kong-response-transformer to set the
Location
header
This plugin covers both and supports a dynamic Location
header generation.
config:
dynamic:
pattern: ^/en
replacement: /
redirect_code: 302
redirect_domain: your-new-api.com
config:
static:
redicert_url: https://your-new-website.com
redirect_code: 302