building opac links - explicit ports were leaking in
in some cases (in this case, safari takes a literal :80 from
an apache redirect). The opac does not work on non-standard
ports as it stands, so no harm done
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6070
dcc99617-32d9-48b4-a31d-
7c20da2025e4
function findBaseURL(ssl) {
var path = findBasePath();
var proto = (ssl) ? "https:" : "http:";
- return proto + "//" + location.host + path;
+
+ /* strip port numbers. This is necessary for browsers that
+ send an explicit <host>:80, 443 - explicit ports
+ break links that need to change ports (e.g. http -> https) */
+ var h = location.host.replace(/:.*/,'');
+
+ return proto + "//" + h + path;
}
/*