Update core.php
Update core.php

When using docker and apache as reverse proxy
 RequestHeader set HTTP_X_FORWARDED_PROTO https
is not passed on to $_SERVER['HTTP_X_FORWARDED_PROTO'] hence emoncms remains in state HTTP with $proto as default set to https.

This fix resolves this issue by adding a check for reading request_headers and not $_SERVER variables.
chaveiro/emoncms,inverse/emoncms,inverse/emoncms,inverse/emoncms,chaveiro/emoncms,emoncms/emoncms,emoncms/emoncms,chaveiro/emoncms,emoncms/emoncms,inverse/emoncms,emoncms/emoncms,chaveiro/emoncms,emoncms/emoncms