From fbe408c72c6c4211e329ddab3b54a42034efc0f4 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Thu, 21 Nov 2013 14:14:30 +0100 Subject: [PATCH] Config option to specify cookie domain for auth This enforces the manually stored cookie to apply to for the given domain, no matter where the auth call is sent. --- examples/htdocs/jakub.html | 3 ++- tools/htdocs/mkws.js | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/htdocs/jakub.html b/examples/htdocs/jakub.html index 9433603..6a06b22 100644 --- a/examples/htdocs/jakub.html +++ b/examples/htdocs/jakub.html @@ -6,7 +6,8 @@ diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index a369f2d..4f4cc5c 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -672,7 +672,8 @@ function mkws_html_all() { mkws_html_switch(); if (mkws_config.use_service_proxy) - mkws_service_proxy_auth(mkws_config.service_proxy_auth); + mkws_service_proxy_auth(mkws_config.service_proxy_auth, + mkws_config.service_proxy_auth_domain); if (mkws_config.responsive_design_width) { // Responsive web design - change layout on the fly based on @@ -765,13 +766,13 @@ function mkws_html_perpage() { * The username/password is configured in the apache config file * for the site. */ -function mkws_service_proxy_auth(auth_url) { +function mkws_service_proxy_auth(auth_url, auth_domain) { debug("Run service proxy auth URL: " + auth_url); var request = new pzHttpRequest(auth_url, function(err) { - alert("HTTP call for authentication failed: " + err) - return; - }); + alert("HTTP call for authentication failed: " + err) + return; + }, auth_domain); request.get(null, function(data) { if (!$.isXMLDoc(data)) { -- 1.7.10.4