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

Merge pull request #441 from protich/issue/436

Support IP forwarding for load balanced instalaltions.
parents b41cdc7f f5408441
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