Http_if_terminated support on Route objects

Hi there,

My team is (or was) about to start implementing kong as our api gateway, but I just noticed the massive changes in release 0.13. While I’m pumped on the new Services and Routes and their concepts, I noticed that the http_if_terminated option is missing on the Route objects. This one is kind of a deal breaker for us. We have a load balancer that terminates our ssl and forwards the request, with x-forwarded-proto=https, to kong. All of this inside of a private network of course. This makes it really hard for us to force https as it was done before using https_only=true and http_if_terminated=true on the API Object.

Anyone have any suggestions on how me might be able to replicate this using Routes?

Even better, has anyone heard anything from the Kong team suggesting that they might support similar functionality on the Route objects at some point?

Any help is much appreciated, thanks!

Answered my own question by, who’d have thought, looking at the source…

It looks like this is handled, though not toggle-able (which makes sense) in kong/handler.lua with the following:

if (protocols 
   and protocols.https and not protocols.http and forwarded_proto ~= "https")
.... returns Upgrade response here ....

I’ll leave this here in case anyone else out there has the same use case .