projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mkws_config.service_proxy_auth_domain no longer need be specified: it
[mkws-moved-to-github.git]
/
tools
/
htdocs
/
mkws.js
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
6c07d2d
..
d3adf6d
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-7,7
+7,7
@@
var mkws = {
sort: 'relevance',
authenticated: false,
var mkws = {
sort: 'relevance',
authenticated: false,
- filters: [],
+ filters: []
};
/*
};
/*
@@
-906,7
+906,8
@@
function mkws_html_all() {
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
@@
-1015,9
+1016,14
@@
function mkws_html_perpage() {
* 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;