Add configuration option for name of the server
This commit is contained in:
@@ -39,6 +39,7 @@ nvhttp_t nvhttp {
|
||||
PRIVATE_KEY_FILE,
|
||||
CERTIFICATE_FILE,
|
||||
|
||||
"sunshine", // sunshine_name
|
||||
"03904e64-51da-4fb3-9afd-a9f7ff70fea4", // unique_id
|
||||
"devices.json" // file_devices
|
||||
};
|
||||
@@ -136,6 +137,7 @@ void parse_file(const char *file) {
|
||||
|
||||
string_f(vars, "pkey", nvhttp.pkey);
|
||||
string_f(vars, "cert", nvhttp.cert);
|
||||
string_f(vars, "sunshine_name", nvhttp.sunshine_name);
|
||||
string_f(vars, "unique_id", nvhttp.unique_id);
|
||||
string_f(vars, "file_devices", nvhttp.file_devices);
|
||||
string_f(vars, "external_ip", nvhttp.external_ip);
|
||||
|
||||
@@ -31,6 +31,8 @@ struct nvhttp_t {
|
||||
std::string pkey; // must be 2048 bits
|
||||
std::string cert; // must be signed with a key of 2048 bits
|
||||
|
||||
std::string sunshine_name;
|
||||
|
||||
std::string unique_id; //UUID
|
||||
std::string file_devices;
|
||||
|
||||
|
||||
+1
-1
@@ -395,7 +395,7 @@ void serverinfo(std::shared_ptr<typename SimpleWeb::ServerBase<T>::Response> res
|
||||
pt::ptree tree;
|
||||
|
||||
tree.put("root.<xmlattr>.status_code", 200);
|
||||
tree.put("root.hostname", "loki-pc");
|
||||
tree.put("root.hostname", config::nvhttp.sunshine_name);
|
||||
|
||||
tree.put("root.appversion", VERSION);
|
||||
tree.put("root.GfeVersion", GFE_VERSION);
|
||||
|
||||
Reference in New Issue
Block a user