Last active
October 31, 2021 08:58
-
-
Save gheydon/bd8f28d1b94bf9dc9febc958745ed126 to your computer and use it in GitHub Desktop.
In Drupal 8 the request object is used to determine if the request is from a reverse proxy. How ever in some cases the headers X-Forwarded-* are not being transmitted correctly so Drupal can't determine if the session between the browser and the reverse proxy are not being correctly. In the case X-Forwarded-Proto is being setting to http instead…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (PHP_SAPI !== 'cli' && $_SERVER['HTTP_X_FORWARDED_PORT'] == 443) { | |
$GLOBALS['request']->headers->set('X_FORWARDED_PROTO', 'https'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment