Red Hat Bugzilla – Bug 843326
mod_wsgi on python-2.6 cartridge does not detect wsgi_url_scheme correctly
Last modified: 2015-05-14 18:57:04 EDT
Description of problem:
When accessing a python cartridge via HTTPS, mod_wsgi does not seem to detect the HTTP_X_FORWARDED_PROTO as https as set the wsgi_url_scheme accordingly.
Version-Release number of selected component (if applicable):
python-2.6 cartridge and whatever version of mod_wsgi that entails.
Steps to Reproduce:
1.create a python-2.6 gear.
2.access it via https
3.check wsgi_url_scheme value in the request
always returns 'http'
when using https, should return 'https'
when using http, should return 'http'
The front-end Apache sets X-Forwarded-Proto before proxying to the wsgi server. It must be getting filtered or reset at the back-end.
I've posted on modwsgi to try and get some clarity on the expected behavior since I don't think double proxied / multi-web layers were taken into account during the initial wsgi spec design.
I don't quite understand the response. Does it make sense to you?
"to identify that proxy actually terminate https and not
I'm also poking around in mod_wsgi.c to see if I can get some clarity on what was designed to happen.
Following the linked comment above works:
$ curl -k https://rmt2-rmillner0211.dev.rhcloud.com/env
Pull request submitted:
Pull request accepted.
Checked on devenv_1933, issue has been fixed.
#curl -k https://py1-bmengdev.dev.rhcloud.com/env
#curl -k http://py1-bmengdev.dev.rhcloud.com/env