aboutsummaryrefslogtreecommitdiff
path: root/zenserver/config.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2022-01-26 12:36:21 +0100
committerStefan Boberg <[email protected]>2022-01-26 12:36:21 +0100
commit1b03128af0eb96f192ab643ca1fec3d62c7ed161 (patch)
tree1cde199c2f605c8aa2c4a2a0705d6651394ab403 /zenserver/config.cpp
parentSuper temporary sentry symbol upload script to help jog my memory whenever I ... (diff)
parentFixed issue with missing endpoint name when configuring upstream cache from Lua. (diff)
downloadzen-1b03128af0eb96f192ab643ca1fec3d62c7ed161.tar.xz
zen-1b03128af0eb96f192ab643ca1fec3d62c7ed161.zip
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenserver/config.cpp')
-rw-r--r--zenserver/config.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp
index 3c4f6f3d8..a36ce5f33 100644
--- a/zenserver/config.cpp
+++ b/zenserver/config.cpp
@@ -337,10 +337,10 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions)
exit(0);
}
- ServerOptions.DataDir = DataDir;
- ServerOptions.ContentDir = ContentDir;
- ServerOptions.AbsLogFile = AbsLogFile;
- ServerOptions.ConfigFile = ConfigFile;
+ ServerOptions.DataDir = DataDir;
+ ServerOptions.ContentDir = ContentDir;
+ ServerOptions.AbsLogFile = AbsLogFile;
+ ServerOptions.ConfigFile = ConfigFile;
ServerOptions.UpstreamCacheConfig.CachePolicy = ParseUpstreamCachePolicy(UpstreamCachePolicyOptions);
if (!ServerOptions.ConfigFile.empty())
@@ -479,6 +479,9 @@ ParseConfigFile(const std::filesystem::path& Path, ZenServerOptions& ServerOptio
if (auto JupiterConfig = UpstreamConfig->get<sol::optional<sol::table>>("jupiter"))
{
UpdateStringValueFromConfig(JupiterConfig.value(),
+ std::string_view("name"),
+ ServerOptions.UpstreamCacheConfig.JupiterConfig.Name);
+ UpdateStringValueFromConfig(JupiterConfig.value(),
std::string_view("url"),
ServerOptions.UpstreamCacheConfig.JupiterConfig.Url);
UpdateStringValueFromConfig(JupiterConfig.value(),
@@ -507,6 +510,8 @@ ParseConfigFile(const std::filesystem::path& Path, ZenServerOptions& ServerOptio
if (auto ZenConfig = UpstreamConfig->get<sol::optional<sol::table>>("zen"))
{
+ ServerOptions.UpstreamCacheConfig.ZenConfig.Name = ZenConfig.value().get_or("name", std::string("Zen"));
+
if (auto Url = ZenConfig.value().get<sol::optional<std::string>>("url"))
{
ServerOptions.UpstreamCacheConfig.ZenConfig.Urls.push_back(Url.value());