Commits

Donald Stufft  committed 79efb50 Merge

Fix HTTPS

  • Participants
  • Parent commits b53a495, 6ed4231
  • Branches production

Comments (0)

Files changed (2)

File templates/standard_template.pt

             <a href="http://developer.rackspace.com/" title="Server hosting by Rackspace Open Source support">hosting by Rackspace</a> /
             <a href="http://www.timparkin.co.uk/" title="Design by Tim Parkin, Yorkshire man, photographer and developer">design by Tim Parkin</a>
           </div>
-          Copyright © 1990-2013, <a href="http://www.python.org/psf">Python Software Foundation</a><br />
+          Copyright © 1990-2014, <a href="http://www.python.org/psf">Python Software Foundation</a><br />
           <a href="http://www.python.org/about/legal">Legal Statements</a>
 
           </div>
 
         # set HTTPS mode if we're directly or indirectly (proxy) supposed to be
         # serving HTTPS links
-        if env.get("HTTPS") == 'on' or \
-                env.get('HTTP_X_FORWARDED_PROTO') == 'https':
+        if env.get('HTTP_X_FORWARDED_PROTO') == 'https':
             self.config.make_https()
         else:
             self.config.make_http()
     # OAuth
     #
     def run_oauth(self):
-        if self.env.get('HTTPS') != 'on':
+        if self.env.get('HTTP_X_FORWARDED_PROTO') != 'https':
             raise NotFound('HTTPS must be used to access this URL')
 
         path = self.env.get('PATH_INFO')