From 8e04c872d492745a7c0d4940ea9dc45d4d599ae6 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Tue, 11 Feb 2025 09:33:56 +0700 Subject: [PATCH] added static files paths in config file --- config.json | 16 ++++++++-------- src/OpenRouter/OpenRouter.cpp | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config.json b/config.json index db3769a..2774c6d 100644 --- a/config.json +++ b/config.json @@ -10,15 +10,10 @@ { "domain": "openrouter.local.com", "ip": "192.168.200.1" - }, - { - "domain": "asdf", - "ip": "1.2.3.4" } ], "servers": [ - "8.8.8.8", - "1.2.3.4" + "8.8.8.8" ] }, "ftp": { @@ -35,13 +30,18 @@ }, "telnet": { "enabled": false, - "port": 25 + "port": 23 }, "wifi": { "channel": 6, "enabled": false, "name": "OpenRouterWifi", - "password": "Simba28082020" + "password": "OpenRouterPassword" } + }, + "static": { + "css": "../src/web/css", + "js": "../src/web/js", + "root": "../src/web" } } \ No newline at end of file diff --git a/src/OpenRouter/OpenRouter.cpp b/src/OpenRouter/OpenRouter.cpp index cb6e6e1..783f891 100644 --- a/src/OpenRouter/OpenRouter.cpp +++ b/src/OpenRouter/OpenRouter.cpp @@ -51,9 +51,9 @@ OpenRouter::OpenRouter() this->srv.Options("/(.*)", api::security::set_cors_headers); - this->srv.set_mount_point("/", "../src/web"); - this->srv.set_mount_point("/js", "../src/web/js"); - this->srv.set_mount_point("/css", "../src/web/css"); + this->srv.set_mount_point("/", config::config.getConfig()["static"]["root"]); + this->srv.set_mount_point("/js", config::config.getConfig()["static"]["js"]); + this->srv.set_mount_point("/css", config::config.getConfig()["static"]["css"]); } OpenRouter::~OpenRouter() = default;