Changes between Initial Version and Version 1 of Ticket #13415
- Timestamp:
- Aug 16, 2021, 6:35:05 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13415
- Property Keywords wsgi http removed
-
Ticket #13415 – Description
initial v1 1 1 Hi, 2 2 3 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.3 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. 4 4 5 The first solution was to switch use_base_url_for_redirect on inside [trac]6 But due to the concerns about use_base_url_for_redirectfrom the docs i wanted to find a better solution.5 The first solution was to switch `use_base_url_for_redirect` on inside `[trac]` 6 But due to the concerns about `use_base_url_for_redirect` from the docs i wanted to find a better solution. 7 7 8 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 enviroment has the Variable HTTPS set to "yes". So i added a workaround to tracd(trac.web.standalone)8 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 `tracd` (trac.web.standalone) 9 9 10 I added the following to the case where {{{httpd.socket = ssl.wrap_socket(...) }}}is also called as this seems appropriate.10 I added the following to the case where `httpd.socket = ssl.wrap_socket(...)` is also called as this seems appropriate. 11 11 {{{#!python 12 12 httpd.environ["HTTPS"]="yes"