Skip to content

Commit

Permalink
Merge pull request #1 from trippyone/backendUrl
Browse files Browse the repository at this point in the history
support bundles with variable backendUrl
  • Loading branch information
paulov-t authored Nov 18, 2023
2 parents a2d111e + b0fcd0c commit 0a09eaa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/EssentialPatches/Bundles/BundleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ public static void GetBundles()

var path = jObj["path"].ToString();
var dependencyKeys = jObj["dependencyKeys"].ToObject<string[]>();

// if server bundle, patch the bundle path to use the backend URL
if (path.Substring(0, 14) == "/files/bundle/")
{
path = StayInTarkovHelperConstants.GetBackendUrl() + path;
}

var bundle = new BundleInfo(key, path, dependencyKeys);

StayInTarkovHelperConstants.Logger.LogInfo($"Adding Custom Bundle : {path}");
Expand Down

0 comments on commit 0a09eaa

Please sign in to comment.