Changeset 311 for binary-improvements
- Timestamp:
- Aug 26, 2017, 8:00:09 PM (7 years ago)
- Location:
- binary-improvements/MapRendering
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/ModInfo.xml
r309 r311 5 5 <Description value="Render the game map to image map tiles as it is uncovered" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="2 1" />7 <Version value="22" /> 8 8 <Website value="http://7dtd.illy.bz" /> 9 9 </ModInfo> -
binary-improvements/MapRendering/Web/Handlers/SessionHandler.cs
r244 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.cs
r309 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.