mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-26 10:13:48 +02:00
Get instance from shortName & fixes
This commit is contained in:
23
AppApi.cs
23
AppApi.cs
@@ -356,29 +356,6 @@ namespace VRCX
|
||||
}));
|
||||
}
|
||||
|
||||
public string FollowUrl(string url)
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.AllowAutoRedirect = false;
|
||||
request.UserAgent = "VRCX";
|
||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
if ((int)response.StatusCode == 301 || (int)response.StatusCode == 302)
|
||||
{
|
||||
url = response.Headers["Location"];
|
||||
if (url.Substring(0, 1) == "/" || (url.Length > 30 && url.Substring(0, 31) == "https://vrchat.com/home/launch?"))
|
||||
return url;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public string CustomCssPath()
|
||||
{
|
||||
var output = String.Empty;
|
||||
|
||||
Reference in New Issue
Block a user