Django app to add an instance's public IP to ALLOWED_HOSTS for Elastic Beanstalk's health check system
Project description
django-ebhealthcheck
By default, Elastic Beanstalk's health check system uses the public IP of each
load balanced instance as the request's host header when making a request.
Unless added to ALLOWED_HOSTS
, this causes Django to return a 400 Bad Request
and a failed health check.
This app dynamically adds your instance's public IP address to Django's
ALLOWED_HOSTS
setting to permit health checks to succeed.
Note this only adds the host to settings - the health check system still
requires /
to return 200 OK
, unless configured differently in EB.
Installation
Simply add ebhealthcheck.apps.EBHealthCheckConfig
to your INSTALLED_APPS
:
INSTALLED_APPS = [
...
'ebhealthcheck.apps.EBHealthCheckConfig',
...
]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for django_ebhealthcheck-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fdeefd72fdda4fd9ea52bdd940debbc2026142b64d235b968cf1be77ee2a2e3 |
|
MD5 | 9378109a47fdc1e4d3eb98998390ecb5 |
|
BLAKE2b-256 | 8263947de8aa56ee0431a2cf0e6fcccd63837b520d552579f1c35e3b10696b5e |