# MIT License
# Copyright (c) 2017 MassChallenge, Inc.

# METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
METHOD_OVERRIDE_HEADER = 'X-HTTP-Method-Override'

class MethodOverrideMiddleware(object):
    def process_request(self, request):
        if request.method != 'POST':
            return
        if METHOD_OVERRIDE_HEADER not in request.META:
            return
        request.method = request.META[METHOD_OVERRIDE_HEADER]

# MIT License
# Copyright (c) 2017 MassChallenge, Inc.

METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'

class MethodOverrideMiddleware(object):
    def process_request(self, request):
        if request.method != 'POST':
            return
        if METHOD_OVERRIDE_HEADER not in request.META:
            return
        print(request.META)
        request.method = request.META[METHOD_OVERRIDE_HEADER]
        print(request.META)

Revert Changes To Middleware To Prevent Build Hangup
[AC-4959] Revert Changes To Middleware To Prevent Build Hangup
