diff options
Diffstat (limited to 'sca-cpp/trunk/modules/http')
-rwxr-xr-x | sca-cpp/trunk/modules/http/httpd-conf | 5 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/http/httpd.hpp | 1 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/open-auth-conf | 7 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/http/openauth.hpp | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/sca-cpp/trunk/modules/http/httpd-conf b/sca-cpp/trunk/modules/http/httpd-conf index 516debd795..67de40e5a6 100755 --- a/sca-cpp/trunk/modules/http/httpd-conf +++ b/sca-cpp/trunk/modules/http/httpd-conf @@ -267,6 +267,11 @@ AuthUserFile "$root/conf/httpd.passwd" Require all granted </Location> +# Mark login page with a header +<Location /login> +Header set X-Login open-auth +</Location> + EOF # Create password and group files diff --git a/sca-cpp/trunk/modules/http/httpd.hpp b/sca-cpp/trunk/modules/http/httpd.hpp index d413e6c288..c1cc16d08d 100644 --- a/sca-cpp/trunk/modules/http/httpd.hpp +++ b/sca-cpp/trunk/modules/http/httpd.hpp @@ -603,6 +603,7 @@ const int externalRedirect(const string& uri, request_rec* r) { debug(uri, "httpd::externalRedirect"); r->status = HTTP_MOVED_TEMPORARILY; apr_table_setn(r->headers_out, "Location", apr_pstrdup(r->pool, c_str(uri))); + apr_table_setn(r->headers_out, "Cache-Control", "no-cache"); r->filename = apr_pstrdup(r->pool, c_str(string("/redirect:/") + uri)); return HTTP_MOVED_TEMPORARILY; } diff --git a/sca-cpp/trunk/modules/http/open-auth-conf b/sca-cpp/trunk/modules/http/open-auth-conf index bed20d75a9..66d36242e2 100755 --- a/sca-cpp/trunk/modules/http/open-auth-conf +++ b/sca-cpp/trunk/modules/http/open-auth-conf @@ -35,7 +35,7 @@ cat >>$root/conf/auth.conf <<EOF AuthType Open AuthName "$host" Session On -SessionCookieName TuscanyOpenAuth domain=.$host; path=/; max-age=31556926 +SessionCookieName TuscanyOpenAuth domain=.$host; path=/ SessionCryptoPassphrase $pw AuthOpenAuth On AuthOpenAuthLoginPage /login @@ -53,10 +53,5 @@ Require valid-user SetHandler form-login-handler </Location> -# Mark login page with a header -<Location /login> -Header set X-Login open-auth -</Location> - EOF diff --git a/sca-cpp/trunk/modules/http/openauth.hpp b/sca-cpp/trunk/modules/http/openauth.hpp index d7377324d9..e044a74fe2 100644 --- a/sca-cpp/trunk/modules/http/openauth.hpp +++ b/sca-cpp/trunk/modules/http/openauth.hpp @@ -77,7 +77,7 @@ const string cookie(const string& sid, const string& domain) { const time_t t = time(NULL) + 86400; char exp[32]; strftime(exp, 32, "%a, %d-%b-%Y %H:%M:%S GMT", gmtime(&t)); - const string c = string("TuscanyOpenAuth=") + sid + ";domain=." + domain + ";path=/;expires=" + string(exp) + ";secure=TRUE"; + const string c = string("TuscanyOpenAuth=") + sid + "; expires=" + string(exp) + "; domain=." + domain + "; path=/"; debug(c, "openauth::cookie"); return c; } |