You are here

function _simplesamlphp_auth_forcehttps_rewrite in simpleSAMLphp Authentication 7.2

Same name and namespace in other branches
  1. 6.3 simplesamlphp_auth.module \_simplesamlphp_auth_forcehttps_rewrite()
  2. 6.2 simplesamlphp_auth.module \_simplesamlphp_auth_forcehttps_rewrite()
  3. 7 simplesamlphp_auth.module \_simplesamlphp_auth_forcehttps_rewrite()

Forces HTTPS connections.

File

./simplesamlphp_auth.module, line 660
simpleSAMLphp authentication module for Drupal.

Code

function _simplesamlphp_auth_forcehttps_rewrite($url) {
  if (variable_get('simplesamlphp_auth_forcehttps', TRUE)) {
    $url = str_replace('http://', 'https://', $url);
    _simplesaml_auth_debug('forcehttps rewrite: ' . $url);
  }
  return $url;
}