# Specify the initial script URL for Novelist (containing account credentials, etc.)
#SetEnv OILS_NOVELIST_URL
+
+
+ # Uncomment to force SSL any time a patron is logged in. This protects
+ # authentication tokens. Left commented out for backwards compat for now.
+ #SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
</LocationMatch>
*/
}
+var forceLoginSSL; // set via Apache env variable
function buildOPACLink(args, slim, ssl) {
if(!args) args = {};
var string = "";
+ if( ssl == undefined && (
+ location.protocol == 'https:' ||
+ (forceLoginSSL && G.user && G.user.session))) {
+ ssl = true;
+ }
+
if(!slim) {
string = findBaseURL(ssl);
if(args.page) string += config.page[args.page];
var nored = false;
try{ if(isFrontPage) nored = true; } catch(e){nored = false;}
- if(!nored) goTo(buildOPACLink(args));
+ if(!nored) goTo(buildOPACLink(args, false, false));
}
getId("home_adv_search_link").setAttribute("href", buildOPACLink({page:ADVANCED}));
getId("home_myopac_link").setAttribute("href", buildOPACLink({page:MYOPAC}, false, true));
}
+
+ <!--#if expr="$OILS_OPAC_FORCE_LOGIN_SSL"-->
+ forceLoginSSL = true;
+ <!--#endif -->
</script>
<!-- enable Dojo date picker -->