Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sjkingo/django-ebhealthcheck
Django app to add an instance's public IP to ALLOWED_HOSTS for Elastic Beanstalk's health check system
https://github.com/sjkingo/django-ebhealthcheck
django elasticbeanstalk python
Last synced: about 1 month ago
JSON representation
Django app to add an instance's public IP to ALLOWED_HOSTS for Elastic Beanstalk's health check system
- Host: GitHub
- URL: https://github.com/sjkingo/django-ebhealthcheck
- Owner: sjkingo
- License: bsd-2-clause
- Created: 2019-03-09T20:54:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-18T21:45:13.000Z (about 1 year ago)
- Last Synced: 2024-10-03T18:19:06.991Z (about 1 month ago)
- Topics: django, elasticbeanstalk, python
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 33
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# django-ebhealthcheck
![PyPI](https://img.shields.io/pypi/v/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. 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',
...
]
```