A new :https_only_handler configuration option has been added. It's expected to be set to a module name. If not set, Sugar still defaults to Sugar.Request.HttpsOnly (thus preserving the current behavior of throwing a Forbidden at non-HTTPS requests)
A new Sugar.Request.HttpToHttps handler has been implemented. It wraps Plug.SSL.
A version bump (since this is worthwhile for a new version, right?).
Pinging @slogsdon and/or @Annwenn for a review / sanity check before this gets merged in.
To summarize:
:https_only_handler
configuration option has been added. It's expected to be set to a module name. If not set, Sugar still defaults toSugar.Request.HttpsOnly
(thus preserving the current behavior of throwing aForbidden
at non-HTTPS requests)Sugar.Request.HttpToHttps
handler has been implemented. It wrapsPlug.SSL
.Pinging @slogsdon and/or @Annwenn for a review / sanity check before this gets merged in.