As some proxies seem to provide HTTP_X_FORWARDED_PROTOCOL instead of HTTP_X_FORWARDED_PROTO, cdn_request_is_https() should check them both:

cdn.module:

@@ -702,6 +702,12 @@
            isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
            &&
            $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'
+         )
+         ||
+         (
+           isset($_SERVER['HTTP_X_FORWARDED_PROTOCOL'])
+           &&
+           $_SERVER['HTTP_X_FORWARDED_PROTOCOL'] == 'https'
          );
 }
 

Comments

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Active » Reviewed & tested by the community

Alright, will do. :)

Wim Leers’s picture

Title: https check fails in environments providing HTTP_X_FORWARDED_PROTOCOL » HTTPS check fails in environments providing HTTP_X_FORWARDED_PROTOCOL
Category: feature » bug
Priority: Normal » Minor
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.