Skip to content

Instantly share code, notes, and snippets.

View vaibhavhrt's full-sized avatar
🙃
Focusing

Vaibhav Vishal vaibhavhrt

🙃
Focusing
View GitHub Profile
@dryan
dryan / settings.py
Last active September 7, 2023 11:04
Handling EC2 ELB health checks and Django's ALLOWED_HOSTS setting.
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
'yourdomain.tld',
'.compute-1.amazonaws.com', # allows viewing of instances directly
]
import requests
EC2_PRIVATE_IP = None
try: