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

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

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'.

Description From Last Updated

We can nuke this now.

chipx86chipx86
chipx86
  1. Awesome! This should cut down on some support issues.

    One thing while you're in there.

  2. reviewboard/admin/siteconfig.py (Diff revision 1)
     
     
    Show all issues

    We can nuke this now.

  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-1.7.x (ac6f869).