summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorArun Isaac2022-06-30 23:17:38 +0530
committerArun Isaac2022-06-30 23:26:57 +0530
commitfd6668c9cb932efa125de4f5ce8b05ff70f6a7ea (patch)
treef049dc9e13525e8f3c82e41cf6d57b7ea90a4aad /bin
parent1f82439b023b7b5b01d9df6c47761dcbba3224e0 (diff)
downloadtissue-fd6668c9cb932efa125de4f5ce8b05ff70f6a7ea.tar.gz
tissue-fd6668c9cb932efa125de4f5ce8b05ff70f6a7ea.tar.lz
tissue-fd6668c9cb932efa125de4f5ce8b05ff70f6a7ea.zip
web: server: Support virtual hosts.
* bin/tissue (tissue-run-web): Add hosts configuration option. * tissue/web/server.scm: Import (tissue utils). (start-web-server): Add host parameters argument. (handler): Read database based on Host header.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tissue4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/tissue b/bin/tissue
index bf69100..4b524b8 100755
--- a/bin/tissue
+++ b/bin/tissue
@@ -251,6 +251,10 @@ Run a web search service reading configuration from CONFIG-FILE.
listen-repl)
(make-unix-domain-server-socket #:path listen-repl))))))
(start-web-server (listen->socket-address (assq-ref args 'listen))
+ (or (assq-ref args 'hosts)
+ ;; Assume current directory as default.
+ `(("localhost"
+ (indexed-repository . ,(getcwd)))))
%xapian-index
(tissue-configuration-web-css (load-config)))))))