cf-python-logging-support
cf-python-logging-support copied to clipboard
Django logging request header issue
It seems we can't get expected "correlation_id" via DjangoRequestReader class.
def get_http_header(self, request, header_name, default=None):
if request is None:
return default
if header_name in request.META:
return request.META.get(header_name)
if header_name.upper() in request.META:
return request.META.get(header_name.upper())
return default
Since in Django, header name will be prefixed with "HTTP_" and replace "-" to "_" in request.META.
Is there any special consideration here?
I am glad to create a PR if it needs fix here.
Hello,
Sorry for the late response. A Pull Request with this fix will be appreciated and we will review it.
BR, Viktor