Skip to main content

django-ebhealthcheck

PyPI

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. This happens upon application start.

Version 2.0.0 and higher supports IMDSv2. If you are using v1 and cannot upgrade, use version 1 of this library instead (pip install django-ebhealthcheck<2.0.0).

Installation

  1. pip install django-ebhealthcheck

  2. Add ebhealthcheck.apps.EBHealthCheckConfig to your INSTALLED_APPS:

    INSTALLED_APPS = [
        ...
        'ebhealthcheck.apps.EBHealthCheckConfig',
        ...
    ]
    

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_ebhealthcheck-2.0.2-py2.py3-none-any.whl (3.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django_ebhealthcheck-2.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_ebhealthcheck-2.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d492a31db8dc6129f8b3dcf970ee5d287f6a7a945688a50e1e9bc0a83cd67ea1
MD5 920b55148c4761bacd48afdf9dc3e23a
BLAKE2b-256 a5ffb81f636acf1561f1c17b8f2c53ce6e265f6f8517188416e5f338cdbc0d31

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.2 This release

1 file

2.0.1

2 files

2.0.0

2 files

1.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page