Skip to content

Commit

Permalink
Web UI: correctly redirect using https when ssl is on.
Browse files Browse the repository at this point in the history
Flask was returning full urls for the redirects and they had http, which
was causing page loads to fail.
  • Loading branch information
tasn committed Mar 28, 2020
1 parent 3919d4a commit 7ecda88
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etesync_dav/radicale/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

from radicale import web

from etesync_dav.mac_helpers import has_ssl

class Web(web.BaseWeb):
def __init__(self, configuration, logger):
Expand All @@ -32,6 +33,8 @@ def start_response(status, headers):
ret_response.append(int(status.split()[0]))
ret_response.append(dict(headers))

if has_ssl():
environ['wsgi.url_scheme'] = 'https'
body = list(app(environ, start_response))[0]
ret_response.append(body)
return tuple(ret_response)
Expand Down

0 comments on commit 7ecda88

Please sign in to comment.