Hi,
I've been trying to figure this out, but need some help.
Kong by default sends an "X-Forwarded-Proto $scheme" header.
Currently I'm overwriting this header to force https (HAProxy does the SSL offloading and forwards in HTTP to Kong) by setting it to:
proxy_set_header X-Forwarded-Proto https;
Now I'd prefer to remove this custom line from the custom_nginx.template and use the Request Transformer Plugin.
I've set up a proxy to httpbin to check the incoming headers:
$ curl
https://url/test/get?show_env=1{
"args": {
"show_env": "1"
},
"headers": {
"Accept": "*/*",
"Host": "url",
"Runscope-Service": "httpbin",
"User-Agent": "curl/7.47.0",
"X-Forwarded-For": "xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx",
"X-Forwarded-Prefix": "/test",
"X-Forwarded-Proto": "http",
"X-Forwarded-Test": "test",
"X-Real-Ip": "xxx.xxx.xxx.xxx"
},
"origin": "xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx",
"url": "
https://url/get?show_env=1"
}
When I do any of the add / append / replace / delete methods I don't see any changes.
Does anyone know what I'm missing?
Thanks,
Stephan