Skip to content

Instantly share code, notes, and snippets.

@mecmartini
Last active November 30, 2020 17:28
Show Gist options
  • Save mecmartini/5533d08aa75f4107fcf6e910da2c907e to your computer and use it in GitHub Desktop.
Save mecmartini/5533d08aa75f4107fcf6e910da2c907e to your computer and use it in GitHub Desktop.
Drupal 8 - Fix url() absolute for https

In settings.php enable:

$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = array($_SERVER['REMOTE_ADDR']);

In .htaccess write in mod_headers.c:

RequestHeader set X-Forwarded-Proto https
RequestHeader set X-Forwarded-Port 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment