SSL transitions from https to http should not be forced on Ajax requests, as they can result in mixed security, and cross-domain failures.

This commit is contained in:
Bertrand Le Roy
2014-01-05 16:11:33 -08:00
parent 9a07d8b419
commit 87ccd59dc0

View File

@@ -53,7 +53,8 @@ namespace Orchard.SecureSocketsLayer.Filters {
// non auth page on a secure canal
// nb: needed as the ReturnUrl for LogOn doesn't force the scheme to http, and reuses the current one
if (!secure && request.IsSecureConnection) {
// Also don't force http on ajax requests.
if (!secure && request.IsSecureConnection && !request.IsAjaxRequest()) {
var insecureActionUrl = AppendQueryString(
request.QueryString,
_sslService.InsecureActionUrl(