Redirect to HTTPS using KONG API


I’m trying to redirect all HTTP to HTTPS in Kong.
I’ve set my route to only accept HTTPS and all HTTP requests are answered with a request to upgrade to HTTPS.

Is it possible to automatically redirect to HTTPS rather than telling the user to upgrade to HTTPS?

Please use https_redirect_status_code property of Route.
You can set it to 301 or 302 to automatically redirect to HTTPS.

This property was introduced in Kong 1.2, so please ensure you are using 1.2 or a later version.

1 Like

I am using kong/1.2.1 and made route accept only HTTPS and updated https_redirect_status_code 302.
After that I stopped getting response.

Thank you. That really help.

Can you please share your solution, I am still facing the issue …