mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-23 22:45:06 -04:00
New: Host Stats
This commit is contained in:
@@ -161,6 +161,15 @@ namespace Prowlarr.Http.Extensions
|
||||
return remoteAddress;
|
||||
}
|
||||
|
||||
public static string GetHostName(this HttpRequest request)
|
||||
{
|
||||
string ip = request.GetRemoteIP();
|
||||
IPAddress myIP = IPAddress.Parse(ip);
|
||||
IPHostEntry getIPHost = Dns.GetHostEntry(myIP);
|
||||
List<string> compName = getIPHost.HostName.ToString().Split('.').ToList();
|
||||
return compName.First();
|
||||
}
|
||||
|
||||
public static string GetServerUrl(this HttpRequest request)
|
||||
{
|
||||
var scheme = request.Scheme;
|
||||
|
||||
Reference in New Issue
Block a user