Reorder middleware to ensure correct headers are available.

It's imperative that middleware which fixes the omitted Azure SSL
headers is evaluated before any subsequent middleware relying on
accurate detection of the secure protocol.