Skip to content

Commit ed33925

Browse files
committed
fixed host resolve
1 parent d11a28b commit ed33925

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Tetrifact.Web/Controllers/ArchivesController.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ public ActionResult GetArchive(string packageId, [FromQuery(Name = "ticket")] st
105105

106106
string host = string.Empty;
107107
if (Request.HttpContext.Connection.RemoteIpAddress != null)
108-
host = Request.HttpContext.Connection.RemoteIpAddress.ToString();
108+
host = Request.HttpContext.Connection.RemoteIpAddress.ToString().ToLower();
109109

110-
bool isLocal = _settings.WhiteListedLocalAddresses.Contains(headers.Host.Host.ToLower());
110+
bool isLocal = _settings.WhiteListedLocalAddresses.Contains(host.ToLower());
111111
string ticketLog = string.Empty;
112112

113113
// local (this website) downloads always allowed.

0 commit comments

Comments
 (0)