django setup allowed hosts allowed hosts django elb

The solution for “django setup allowed hosts allowed hosts django elb” can be found here. The following code will assist you in solving the problem.

ALLOWED_HOSTS = [‘*’]
from django.http import HttpResponse
from django.utils.deprecation import MiddlewareMixin

class HealthCheckMiddleware(MiddlewareMixin):
def process_request(self, request):
if request.META[“PATH_INFO”] == “/ping/”:
return HttpResponse(“pong”)

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in