aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/meta_conf_make_meta.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/meta_conf_make_meta.org')
-rw-r--r--org/meta_conf_make_meta.org16
1 files changed, 8 insertions, 8 deletions
diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org
index fcae4bb..0a6074b 100644
--- a/org/meta_conf_make_meta.org
+++ b/org/meta_conf_make_meta.org
@@ -213,8 +213,9 @@ struct ConfCompositeMakeInit {
#+name: meta_defaults_template_structs
#+BEGIN_SRC d
struct ConfCompositeSiteLocal {
- string webserv_url_root;
- string webserv_path;
+ string webserv_url_doc_root;
+ string webserv_url_domain;
+ string webserv_url_doc_path;
string webserv_images;
string webserv_cgi;
string webserv_cgi_host;
@@ -651,12 +652,11 @@ if ("webserv" in _json.object) {
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")