From d04995c5146e2987bea4875e88c5e6da04ecc048 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 10 Oct 2011 22:17:24 -0400 Subject: [PATCH] Implemented and documented a '-g' option for WebCit to enable a default landing page for guests. --- webcit/README.txt | 8 ++++++++ webcit/webserver.c | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/webcit/README.txt b/webcit/README.txt index 5ff05b533..14a20655e 100644 --- a/webcit/README.txt +++ b/webcit/README.txt @@ -109,11 +109,13 @@ something like this: the "webcit" program: webcit [-i ip_addr] [-p http_port] [-s] [-S cipher_suite] [-t tracefile] + [-g guest_landing_page ] [-c] [-f] [remotehost [remoteport]] *or* webcit [-i ip_addr] [-p http_port] [-s] [-S cipher_suite] [-t tracefile] + [-g guest_landing_page ] [-c] [-f] uds /your/citadel/directory Explained: @@ -134,6 +136,12 @@ the "webcit" program: -> tracefile: where you want WebCit to log to. This can be a file, a virtual console, or /dev/null to suppress logging altogether. + + -> The "guest landing page" is a location on your WebCit installation where + unauthenticated guest users are taken when they first enter the root of + your site. If guest mode is not enabled on your Citadel server, they will + be taken to a login page instead. If guest mode is enabled but no landing + page is defined, they will be taken to the Lobby. -> The "-c" option causes WebCit to output an extra cookie containing the identity of the WebCit server. The cookie will look like this: diff --git a/webcit/webserver.c b/webcit/webserver.c index 07b3e9645..ef1c5eb8e 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -109,9 +109,9 @@ int main(int argc, char **argv) /* Parse command line */ #ifdef HAVE_OPENSSL - while ((a = getopt(argc, argv, "u:h:i:p:t:T:B:x:dD:G:cfsS:Z")) != EOF) + while ((a = getopt(argc, argv, "u:h:i:p:t:T:B:x:g:dD:G:cfsS:Z")) != EOF) #else - while ((a = getopt(argc, argv, "u:h:i:p:t:T:B:x:dD:G:cfZ")) != EOF) + while ((a = getopt(argc, argv, "u:h:i:p:t:T:B:x:g:dD:G:cfZ")) != EOF) #endif switch (a) { case 'u': @@ -136,6 +136,9 @@ int main(int argc, char **argv) pidfile = strdup(optarg); running_as_daemon = 1; break; + case 'g': + default_landing_page = strdup(optarg); + break; case 'B': /* Basesize */ basesize = atoi(optarg); if (basesize > 2) -- 2.30.2