Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

allowed hosts django elb

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")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #allowed #hosts #django #elb
ADD COMMENT
Topic
Name
5+4 =