Created
August 26, 2018 12:18
-
-
Save simesy/f667eab8eb180bc5bbeb319c4a7930ea to your computer and use it in GitHub Desktop.
Debugging some proxy things
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
| <?php | |
| print "\n\nSERVER HEADERS:\n\n"; | |
| print(var_export($_SERVER, TRUE)); | |
| print "\n\nSymfony HTTP Foundation request headers:\n\n"; | |
| $request = \Drupal::request(); | |
| foreach ($request->headers->all() as $key => $header) { | |
| print $key . ': ' . $header[0] . "\n"; | |
| } | |
| print "\n\nExpected base url: " . $request->getBaseUrl(); | |
| print "\n\nDrupal settings\n\n"; | |
| $settings = \Drupal\Core\Site\Settings::getAll(); | |
| foreach (['reverse_proxy', 'reverse_proxy_addresses', 'reverse_proxy_header', 'reverse_proxy_proto_header', 'reverse_proxy_port_header', 'reverse_proxy_host_header', 'reverse_proxy_forwarded_header'] as $key) { | |
| print $key . ': ' . $settings[$key] . "\n"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment