Skip to content
Snippets Groups Projects
Commit f5408441 authored by Peter Rotich's avatar Peter Rotich
Browse files

Support IP forwarding for load balanced instalaltions.

parent 51e2cef4
No related branches found
No related tags found
No related merge requests found
......@@ -170,6 +170,10 @@
define('API_KEY_TABLE',TABLE_PREFIX.'api_key');
define('TIMEZONE_TABLE',TABLE_PREFIX.'timezone');
#Global overwrite
if($_SERVER['HTTP_X_FORWARDED_FOR']) //Can contain multiple IPs - use the last one.
$_SERVER['REMOTE_ADDR'] = array_pop(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']));
#Connect to the DB && get configuration from database
$ferror=null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment