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.
By plach on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
7.x
Introduced in version:
7.54
Issue links:
Description:
Drupal determines whether it is serving an HTTPS request (and initializes the $is_https
global variable) right after including the settings.php
file. However that logic can be also useful while initializing settings, for instance when crafting base URLs. For this purpose the related logic has been encapsulated in a new API function: drupal_is_https(). This returns the same result as $GLOBALS['is_https']
but can be reliably executed at any point of the execution flow.
Impacts:
Module developers