forked from zombieb/undead-universal-patch-il2cpp
- SignalR handshake fix
- Self-hosted PhotonSocketServer support - Split photon and hile event patch - Deprecated amplitude redirect patch
This commit is contained in:
@@ -59,26 +59,19 @@ namespace undead_universal_patch_il2cpp.Patches
|
||||
|
||||
if (newUri.ToString().Contains("ns.rec.net")) newUri = new Il2CppSystem.Uri(NameserverConfig.NewUrl.Value);
|
||||
|
||||
if (newUri.ToString().Contains("api.amplitude"))
|
||||
{
|
||||
Il2CppSystem.UriBuilder replaceUri = new(new Il2CppSystem.Uri(NameserverConfig.NewUrl.Value));
|
||||
replaceUri.Path = "/amplitude";
|
||||
newUri = replaceUri.Uri;
|
||||
}
|
||||
|
||||
if (GalvanicConfig.Enabled.Value)
|
||||
{
|
||||
string[] applyHeader = [
|
||||
"authservice/cachedlogin/forplatformid",
|
||||
"accountservice/account/create",
|
||||
"authservice/connect/token"
|
||||
"/cachedlogin/forplatformid",
|
||||
"/account/create",
|
||||
"/connect/token"
|
||||
];
|
||||
foreach (string header in applyHeader)
|
||||
{
|
||||
if (newUri.PathAndQuery.Contains(header))
|
||||
{
|
||||
// refresh the token if it expired
|
||||
// this is somewhat inefficient, but we don't hook into many requests (see below) so it should be fine
|
||||
// this is somewhat inefficient, but we don't hook into many requests (see above) so it should be fine
|
||||
Galvanic.GalvanicWebAuth.TokenExpiry();
|
||||
|
||||
Type httpRequestType = request.GetType();
|
||||
|
||||
Reference in New Issue
Block a user