Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
Currently SlingHttpServletRequest.getScheme() only supports "https", if the HTTPS connection is terminated locally. But in many environments the https connection is terminated at a frontend layer (either loadbalancer or webserver), and then the requests are forwarded via http to sling (plus a special header indicating that this request was once received via https). Then .getScheme() won't return "https" anymore, but only "http".
I would like to extend the SlingHttpServletRequestImpl and implement a .getScheme(), which considers a configurable HTTP header (e.g. "X-frontend-ssl") of the request. If this value is set, then .getScheme() will return "https".
I want to make this header name configurable via OSGI, but I haven't found any good place yet. Any ideas?