Skip to content

Instantly share code, notes, and snippets.

View kichik's full-sized avatar
🏃‍♂️
GitHub running

Amir Szekely kichik

🏃‍♂️
GitHub running
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: