aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta/conf_make_meta_json.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2018-09-28 17:15:44 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-04-10 15:14:15 -0400
commit3ee2ed36bd81f7f097aebf946983a732d6d27665 (patch)
treeb205c2d744b587034556c8ad681adf62c38315bf /src/doc_reform/meta/conf_make_meta_json.d
parentmess further with parallelism flags (diff)
config webserv_url_doc_root, domain & path
Diffstat (limited to 'src/doc_reform/meta/conf_make_meta_json.d')
-rw-r--r--src/doc_reform/meta/conf_make_meta_json.d11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/doc_reform/meta/conf_make_meta_json.d b/src/doc_reform/meta/conf_make_meta_json.d
index 30aaedc..cf4c21a 100644
--- a/src/doc_reform/meta/conf_make_meta_json.d
+++ b/src/doc_reform/meta/conf_make_meta_json.d
@@ -211,12 +211,11 @@ static template contentJSONtoDocReformStruct() {
if ("url_root" in _json.object["webserv"]
&& (_json.object["webserv"]["url_root"].type().to!string == "STRING")
) {
- _struct_composite.conf.webserv_url_root = _json.object["webserv"]["url_root"].str;
- }
- if ("path" in _json.object["webserv"]
- && (_json.object["webserv"]["path"].type().to!string == "STRING")
- ) {
- _struct_composite.conf.webserv_path = _json.object["webserv"]["path"].str;
+ _struct_composite.conf.webserv_url_doc_root = _json.object["webserv"]["url_root"].str;
+ if (auto m = _struct_composite.conf.webserv_url_doc_root.match(_rgx.webserv_url_doc_root)) {
+ _struct_composite.conf.webserv_url_domain = m.captures[2].to!string;
+ _struct_composite.conf.webserv_url_doc_path = m.captures[3].to!string;
+ }
}
if ("images" in _json.object["webserv"]
&& (_json.object["webserv"]["images"].type().to!string == "STRING")