tracd is redirecting to http when using https
|Reported by:||Owned by:||Jun Omae|
Fix wrong redirect when
Description (last modified by )
we are using
tracd for a small internal team on a non standard port. Recently we switched to https for internal reasons. So we added the required parameters to
tracd and restarted. At first glance everything was fine. But after some days we noticed that sometimes Trac was sending us back to http. First we thought about the browser cache. But after some debugging I found out that trac was redirecting us to http via the Location http header.
The first solution was to switch
use_base_url_for_redirect on inside
But due to the concerns about
use_base_url_for_redirect from the docs i wanted to find a better solution.
So i debugged and found out that the
scheme=http is set from the
WSGIGateway.__init__ where some additional checks are also performt. One of those is if the environment has the Variable
HTTPS set to
"yes". So i added a workaround to
I added the following to the case where
httpd.socket = ssl.wrap_socket(...) is also called as this seems appropriate.
Change History (6)
comment:5 by , 6 weeks ago
|Release Notes:||modified (diff)|
|Status:||assigned → closed|