jazzband/django-silk

SILKY_HIDE_COOKIES does not hide cookie header in different case

shtimn opened this issue · 0 comments

The SILKY_HIDE_COOKIES setting does not hide the cookie header if it is written in a different case.

Current behavior:
When using the SILKY_HIDE_COOKIES setting, the cookie header is not hidden if it is written in a different case compared to the specified name in the code in upper case
Expected behavior:
The SILKY_HIDE_COOKIES setting should hide the cookie header, regardless of the case in which it is written. Currently, it only works if the case matches exactly.

Steps to reproduce:

  1. Set the SILKY_HIDE_COOKIES setting to True.
  2. Send a request with a 'cookie' header in lower case.
  3. Inspect the request headers on the server side, and observe that the 'COOKIE' header is present.

Refs

  • COOKIE in upper case is hardcoded here