Subversion Repositories oidplus

Rev

Rev 1207 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1207 Rev 1289
Line 237... Line 237...
237
                                if (xhr.status === 200) {
237
                                if (xhr.status === 200) {
238
                                        $("#enforce_ssl").val('OIDplus::ENFORCE_SSL_YES'); // enforce SSL (we checked that it loads correctly)
238
                                        $("#enforce_ssl").val('OIDplus::ENFORCE_SSL_YES'); // enforce SSL (we checked that it loads correctly)
239
                                } else {
239
                                } else {
240
                                        console.log("JS SSL detection result: "+xhr.status);
240
                                        console.log("JS SSL detection result: "+xhr.status);
241
                                        $("#enforce_ssl").val('OIDplus::ENFORCE_SSL_NO'); // disable SSL (because it failed, e.g. because of invalid cert or closed port)
241
                                        $("#enforce_ssl").val('OIDplus::ENFORCE_SSL_NO'); // disable SSL (because it failed, e.g. because of invalid cert or closed port)
242
                                        setCookie('SSL_CHECK', 0, 0/*Until browser closes*/, oidplus_webpath); // we must revert the SSL_CHECK=1 the PHP script did set (see explanation in OIDplus.class.php:isSslAvailable)
242
                                        setCookie('SSL_CHECK', 0, 0/*Until browser closes*/, oidplus_webpath_relative); // we must revert the SSL_CHECK=1 the PHP script did set (see explanation in OIDplus.class.php:isSslAvailable)
243
                                }
243
                                }
244
                        }
244
                        }
245
                };
245
                };
246
                var https_url = window.location.href.replace(/^http:/i, "https:");
246
                var https_url = window.location.href.replace(/^http:/i, "https:");
247
                xhr.open('GET', https_url);
247
                xhr.open('GET', https_url);