Changeset 311 for binary-improvements/MapRendering/Web
- Timestamp:
- Aug 26, 2017, 8:00:09 PM (8 years ago)
- Location:
- binary-improvements/MapRendering/Web
- Files:
- 
      - 2 edited
 
 - 
          
  Handlers/SessionHandler.cs (modified) (1 diff)
- 
          
  Web.cs (modified) (2 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      binary-improvements/MapRendering/Web/Handlers/SessionHandler.csr244 r311 52 52 } 53 53 } else if (subpath.StartsWith ("login")) { 54 string host = ( parent.isSslRedirected? "https://" : "http://") + req.UserHostName;54 string host = (Web.isSslRedirected (req) ? "https://" : "http://") + req.UserHostName; 55 55 string url = OpenID.GetOpenIdLoginUrl (host, host + "/session/verify"); 56 56 resp.Redirect (url); 
- 
      binary-improvements/MapRendering/Web/Web.csr309 r311 24 24 private bool useStaticCache = false; 25 25 26 public bool isSslRedirected { 27 private set; 28 get; 26 public static bool isSslRedirected (HttpListenerRequest req) { 27 string proto = req.Headers ["X-Forwarded-Proto"]; 28 if (!string.IsNullOrEmpty (proto)) { 29 return proto.Equals ("https", StringComparison.OrdinalIgnoreCase); 30 } 31 32 return false; 29 33 } 30 34 … … 44 48 45 49 // TODO: Read from config 46 isSslRedirected = false;47 50 useStaticCache = false; 48 51 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  ![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
