I was writing a Django application for a project and needed to protect it from the general public. An amazingly simple library called wsgi_basic_auth made this easy.
Added to my
Appended to my
# Tack on HTTP Basic Auth # Configured with env variables: # WSGI_AUTH_CREDENTIALS=user:password # WSGI_AUTH_EXCLUDE_PATHS=/not/protected # WSGI_AUTH_PATHS=/protected from wsgi_basic_auth import BasicAuth application = BasicAuth(application)
Some pre-deploy checks: