Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Wim LeersAlright, will do. :)
Comment #2
Wim LeersThis is kind of a rare bug, so reclassifying.
D7: http://drupalcode.org/project/cdn.git/commit/c7be12b06a535a4297b8e486a0c...
D6: http://drupalcode.org/project/cdn.git/commit/9024555c417ef89b842eff614f0...