If I call an HTTPS URL on my EB-deployed Django app that issues a redirect, the redirect location URL uses the HTTP scheme rather than the HTTPS scheme. The root cause seems to be the same as reported in Django issue #12043.
The following middleware class solves the problem, but it would be great if this could be handled correctly by Apache instead.
def process_request(self, request):
if 'HTTP_X_FORWARDED_PROTO' in request.META:
request.META['wsgi.url_scheme'] = request.META['HTTP_X_FORWARDED_PROTO']