Hi Vishwas,
Can you state the circumstances in which this middleware will be
useful? Note that with the help of Let's Encrypt[1], a HTTPS
certificate is freely available to anyone, so there is no financial
barrier to using it.
Over and beyond the subject matter, is there anything preventing
implementation of your proposed middleware as an external package?
If there is, please let us know, perhaps there is a missing API we
need to add. If there isn't, then it would be better to do it that way
first -- so your method can be tested in real use before we consider
putting it into the framework.
Hope this helps,
Shai.
[1]
https://letsencrypt.org/