#703: WebSession: detect proper client IP when behind load balancer
-------------------------+-----------------
Reporter: simko | Owner:
Type: defect | Status: new
Priority: critical | Milestone:
Component: WebSession | Version:
Resolution: | Keywords:
-------------------------+-----------------
Comment (by simko):
Example of headers we can use:
{{{
{'mod_wsgi.listener_port': '80', 'HTTP_X_FORWARDED_SERVER':
'inspiretest.cern.ch', 'HTTP_COOKIE':
'INVENIOSESSION=ac38f00f3c33d81dfcd810504bd9e6b3',
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'SERVER_SOFTWARE': 'Apache',
'SCRIPT_NAME': '', 'mod_wsgi.handler_script': '', 'SERVER_SIGNATURE':
'', 'REQUEST_METHOD': 'GET', 'PATH_INFO': '/search/cache',
'SERVER_PROTOCOL': 'HTTP/1.1', 'QUERY_STRING': '',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux x86_64; en-US;
rv:1.9.1.19) Gecko/20110430 Conkeror/0.9.3
(Debian-0.9.3+git110602-1)', 'HTTP_CONNECTION': 'Keep-Alive',
'SERVER_NAME': 'inspiretest.cern.ch', 'REMOTE_ADDR': '137.138.4.150',
'mod_wsgi.request_handler': 'wsgi-script', 'wsgi.url_scheme': 'http',
'PATH_TRANSLATED':
'/opt/cds-invenio/var/www-wsgi/invenio.wsgi/search/cache',
'SERVER_PORT': '80', 'wsgi.multiprocess': True,
'mod_wsgi.input_chunked': '0', 'SERVER_ADDR': '137.138.4.149',
'DOCUMENT_ROOT': '/opt/cds-invenio/var/www', 'mod_wsgi.process_group':
'invenio', 'wsgi.post_form': (, , {'ln': [Field('ln', 'en')]}),
'SCRIPT_FILENAME': '/opt/cds-invenio/var/www-wsgi/invenio.wsgi',
'SERVER_ADMIN': '[email protected]', 'wsgi.input': , 'HTTP_HOST':
'inspiretest.cern.ch', 'wsgi.multithread': False,
'mod_wsgi.callable_object': 'application', 'HTTP_CACHE_CONTROL':
'max-age=0', 'REQUEST_URI': '/search/cache', 'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'mod_wsgi.listener_host': '', 'wsgi.version': (1, 1),
'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_X_FORWARDED_FOR':
'128.141.28.8', 'wsgi.errors': , 'REMOTE_PORT': '40205',
'HTTP_X_FORWARDED_HOST': 'inspiretest.cern.ch', 'mod_wsgi.version':
(3, 3), 'wsgi.run_once': False, 'mod_wsgi.application_group': '',
'mod_wsgi.script_reloading': '1', 'wsgi.file_wrapper': ,
'HTTP_ACCEPT_ENCODING': 'gzip,deflate'}
}}}
--
Ticket URL: <http://invenio-software.org/ticket/703#comment:1>
Invenio <http://invenio-software.org>