mirror of
https://github.com/Novetus/Novetus_src.git
synced 2025-01-31 09:41:33 +02:00
updated asset redirection script
This commit is contained in:
parent
8fb827ab05
commit
fc4730b721
@ -1,3 +1,11 @@
|
||||
1.3 Snapshot v22.8406.29069.1
|
||||
Enhancements:
|
||||
- Changed the design of the Console to be more user friendly.
|
||||
- Further improved web proxy and Console reliability.
|
||||
|
||||
Fixes:
|
||||
- Fixed a bug involving cleraing the Console.
|
||||
----------------------------------------------------------------------------
|
||||
1.3 Snapshot v22.8406.21589.1
|
||||
Enhancements:
|
||||
- Added the following functionality to the Web Proxy:
|
||||
|
@ -27,7 +27,6 @@ public class Asset : IWebProxyExtension
|
||||
long id;
|
||||
if (!long.TryParse(NetFuncs.FindQueryString(query, "id"), out id))
|
||||
{
|
||||
Util.ConsolePrint(Name() + ": Redirecting " + query, 3);
|
||||
e.Redirect("https://assetdelivery.roblox.com/v1/asset/" + query);
|
||||
}
|
||||
else
|
||||
@ -36,18 +35,13 @@ public class Asset : IWebProxyExtension
|
||||
|
||||
if (PathList.Count > 0)
|
||||
{
|
||||
Util.ConsolePrint(Name() + ": Local assets for " + id.ToString() + " found. Redirecting " + query, 3);
|
||||
Util.ConsolePrint(Name() + ": Local asset for " + id.ToString() + " found. Using local asset.", 3);
|
||||
string First = PathList[0];
|
||||
byte[] numArray = await Task.Run(() => File.ReadAllBytes(First));
|
||||
e.Ok(numArray, (IEnumerable<HttpHeader>) new List<HttpHeader>()
|
||||
{
|
||||
new HttpHeader("Content-Length", ((long) numArray.Length).ToString()),
|
||||
new HttpHeader("Cache-Control", "no-cache")
|
||||
});
|
||||
e.Ok(numArray, NetFuncs.GenerateHeaders(((long) numArray.Length).ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
Util.ConsolePrint(Name() + ": No local assets for " + id.ToString() + ". Redirecting " + query, 5);
|
||||
e.Redirect("https://assetdelivery.roblox.com/v1/asset/" + query);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
@ECHO OFF
|
||||
|
||||
SET debug=1
|
||||
SET debug=0
|
||||
SET basedir=%CD%\scripts
|
||||
|
||||
SET gamescriptdir=%basedir%\game
|
||||
|
@ -9,5 +9,5 @@ ExtendedVersionEditChangelog=True
|
||||
//ExtendedVersionTemplate=%version% v11.2022.%extended-revision%%lite%
|
||||
ExtendedVersionTemplate=%version% Snapshot v22.%build%.%revision%.%extended-revision%
|
||||
ExtendedVersionRevision=1
|
||||
InitialBootup=True
|
||||
InitialBootup=False
|
||||
IsLite=False
|
||||
|
Loading…
Reference in New Issue
Block a user