{ "info": { "author": "Ricardo Galli", "author_email": "gallir@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: Public Domain", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP" ], "description": "=========\nBehind_LB\n=========\n\nBehind-LB is a very simple and efficient Django middleware to obtain\nthe client IP address when the project runs behind a trusted load\nbalancer.\n\nIt allows to specify the path that activate the middleware, for example\n``/`` or ``/a/specific/path``. The path *must* be specified in the variable\n``BEHIND_LB_PATH`` in your settings.py.\n\nIt works with any load balancer that sends the public remote address in\na fixed relative position in the header (first, second,... , last).\nFor example, Amazon ELB puts it in the last position, Google Compute\nLoad Balancer in the penultimate one. The position *must*\nbe specified in ``settings.BEHIND_LB_POSITION``.\n\nQuick start\n-----------\n\n1. Install the package:\n\n ``pip install django-behind-lb``\n\n2. Just add ``django-behind-lb`` to your ``INSTALLED_APPS`` setting like this::\n\n MIDDLEWARE_CLASSES = (\n 'behind_lb.middleware.BehindLB',\n ...\n\n3. Configure the path and position in settings.py::\n\n BEHIND_LB_PATH = \"/\"\n BEHIND_LB_POSITION = -2 # For Google Compute Engine\n\n\n4. Try it reading the default ``request.META['REMOTE_ADDR']`` in a View class. It\n should read the real client IP.\n\nPosition options\n----------------\n\nThe ``BEHIND_LB_PATH`` value specifies the position of the real IP address in the\n``X-Forwarded-For header``, where 0 is the first (or \"left\"), 1 the second, -2 the\npenultimate position and -1 the last one. Examples::\n\n BEHIND_LB_POSITION = 0 # First\n\n BEHIND_LB_POSITION = -2 # Next to last, for Google Compute Engine LB\n\n BEHIND_LB_POSITION = -1 # Last, for Amazon EC2 LB\n\nIn Github\n---------\n\nThe code is available at https://github.com/APSL/django-behind-lb", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.apsl.net/", "keywords": null, "license": "Public Domain", "maintainer": null, "maintainer_email": null, "name": "django-behind-lb", "package_url": "https://pypi.org/project/django-behind-lb/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-behind-lb/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.apsl.net/" }, "release_url": "https://pypi.org/project/django-behind-lb/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "A very efficient and simple Django middleware to obtain the real IP address from the headers sent by a trusted load balancer", "version": "1.0.2" }, "last_serial": 1751342, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2f5bd1d792f74e4b6f4acc6f35c3f081", "sha256": "b1be0718386af8deedb6b8dd12f2b201d583a0231beb4882e993736c20c2cdb0" }, "downloads": -1, "filename": "django-behind-lb-0.1.tar.gz", "has_sig": false, "md5_digest": "2f5bd1d792f74e4b6f4acc6f35c3f081", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2972, "upload_time": "2015-10-03T16:18:37", "url": "https://files.pythonhosted.org/packages/cc/6e/7aced2421e59bce8208b4b1e48a2beb06f880ba7960d830d198d8aee9202/django-behind-lb-0.1.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "91f49e6e3b1cb199ea401129f2e4ede0", "sha256": "d2f516e845b53d9a161f94faca83a202cab158889628fd02f4aa680c17dec451" }, "downloads": -1, "filename": "django-behind-lb-1.0.tar.gz", "has_sig": false, "md5_digest": "91f49e6e3b1cb199ea401129f2e4ede0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2973, "upload_time": "2015-10-03T16:19:44", "url": "https://files.pythonhosted.org/packages/49/b0/81bf8850977f2e25a057f0527c0e670a9cbb3117ee4f386b7424845a825c/django-behind-lb-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "3b679eec628ff0e23a48323baf53b723", "sha256": "aafce834106fe952cf371032ff4d78d9464155c94ec4ac47b7787d6888cd0cc5" }, "downloads": -1, "filename": "django-behind-lb-1.0.1.tar.gz", "has_sig": false, "md5_digest": "3b679eec628ff0e23a48323baf53b723", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2986, "upload_time": "2015-10-03T16:27:19", "url": "https://files.pythonhosted.org/packages/03/0e/b1c9060f32918d234e028ce7de28669a077ffb1512b141ad1683aa467da9/django-behind-lb-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "3c89b345355285288561cc29767ad426", "sha256": "9995fa77d719bb725fbfb7651b9d5aa15bc8aad45f57a9ac85cbc531836292be" }, "downloads": -1, "filename": "django-behind-lb-1.0.2.tar.gz", "has_sig": false, "md5_digest": "3c89b345355285288561cc29767ad426", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3010, "upload_time": "2015-10-04T15:10:37", "url": "https://files.pythonhosted.org/packages/a8/e0/52017efb7a9d45906a49c613efe52f3efacc60ad92f7b0a48ce16070a6e5/django-behind-lb-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3c89b345355285288561cc29767ad426", "sha256": "9995fa77d719bb725fbfb7651b9d5aa15bc8aad45f57a9ac85cbc531836292be" }, "downloads": -1, "filename": "django-behind-lb-1.0.2.tar.gz", "has_sig": false, "md5_digest": "3c89b345355285288561cc29767ad426", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3010, "upload_time": "2015-10-04T15:10:37", "url": "https://files.pythonhosted.org/packages/a8/e0/52017efb7a9d45906a49c613efe52f3efacc60ad92f7b0a48ce16070a6e5/django-behind-lb-1.0.2.tar.gz" } ] }