is extracted automatically from mkws_config.pazpar2_url if not given.
if (mkws_config.use_service_proxy)
mkws_service_proxy_auth(mkws_config.service_proxy_auth,
if (mkws_config.use_service_proxy)
mkws_service_proxy_auth(mkws_config.service_proxy_auth,
- mkws_config.service_proxy_auth_domain);
+ mkws_config.service_proxy_auth_domain,
+ mkws_config.pazpar2_url);
if (mkws_config.responsive_design_width) {
// Responsive web design - change layout on the fly based on
if (mkws_config.responsive_design_width) {
// Responsive web design - change layout on the fly based on
* The username/password is configured in the apache config file
* for the site.
*/
* The username/password is configured in the apache config file
* for the site.
*/
-function mkws_service_proxy_auth(auth_url, auth_domain) {
+function mkws_service_proxy_auth(auth_url, auth_domain, pp2_url) {
debug("Run service proxy auth URL: " + auth_url);
debug("Run service proxy auth URL: " + auth_url);
+ if (!auth_domain) {
+ auth_domain = pp2_url.replace(/^http:\/\/(.*?)\/.*/, '$1');
+ debug("guessed auth_domain '" + auth_domain + "' from pp2_url '" + pp2_url + "'");
+ }
+
var request = new pzHttpRequest(auth_url, function(err) {
alert("HTTP call for authentication failed: " + err)
return;
var request = new pzHttpRequest(auth_url, function(err) {
alert("HTTP call for authentication failed: " + err)
return;