Modifies RemoteRequest.js to convert any http:// request URL to https:// if the
requesting location has a chrome:// protocol.
Modifies util/network.js such that any use of util.network.request (as opposed
to util.network.simple_request) will assume "secure" for the resulting request.
Adds an example to the bottom of eg_vhost.conf for forcing SSL for an entire
site (OPAC and everything), courtesy of Dan Wells.
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
</IfModule>
</IfModule>
</Location>
+
+# Uncomment the following to force SSL for everything. Note that this defeats caching
+# and you will suffer a performance hit.
+#RewriteCond %{HTTPS} off
+#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
url = 'http://'+XML_HTTP_SERVER+'/'+XML_HTTP_GATEWAY;
if( url.match(/^http:/) &&
- (this.secure || location.href.match(/^https:/)) ) {
+ (this.secure || location.href.match(/^https:/) || location.href.match(/^chrome:/) ) ) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
url = url.replace(/^http:/, 'https:');
}
//obj.error.sdump('D_SES','request '+ app + ' ' + name +' '+obj.error.pretty_print(sparams.slice(1,sparams.length-1))+
// '\noverride_params = ' + override_params + '\n_params = ' + _params + '\n');
- try {
+ try {
+
+ if (typeof _params == 'undefined') {
+ // If we're not using simple_request to get here, let's assume secure by default
+ _params = { 'secure' : true };
+ }
var request = this._request(app,name,params,f,override_params,_params);
if (request) {