• 
      

    Trust the user when they say that their server name starts with 'https'

    Review Request #5490 — Created Feb. 17, 2014 and submitted — Latest diff uploaded

    Information

    Review Board
    master
    52590c8...

    Reviewers

    Trust the user when they say that their server name starts with 'https'

    We have a long-standing bug where someone would configure Review Board to use
    HTTPS only, but due to proxies or other methods, the HttpRequest wouldn't think
    it was https. This meant that any URLs created by the Django resolvers would
    start with 'http' instead of 'https'.

    Because we know what the user configured their server name as, we can choose in
    load_site_config() whether to set the 'HTTPS' environment variable or not. We
    also need to set wsgi.url_scheme to 'https' in request.META for wsgi-based
    clients.

    Configured my devserver with a server name starting with "https" and fetched
    the API root. Saw that all the links returned started with 'https'.