Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django logging request header issue #62

Open
leapin-devops opened this issue Jan 11, 2022 · 1 comment
Open

Django logging request header issue #62

leapin-devops opened this issue Jan 11, 2022 · 1 comment

Comments

@leapin-devops
Copy link

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.

@Viktor-Velkov
Copy link

Hello,

Sorry for the late response.
A Pull Request with this fix will be appreciated and we will review it.

BR,
Viktor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants