| 19 | | That doesn't look right, and I doubt anybody is doing this, so I was interested to discuss a code change. However, a better idea than forcing ASGI projects to subclass the middleware would be to perform the lookup against `self.headers`, which already supports lookups by unprefixed header names. This is a little more defensible to document, I feel. The only behavior change would be that an ASGI-only project could now set `header = "WITH-HYPHENS"` and benefit from a more flexible lookup, which is backward compatible. |
| | 19 | That doesn't look right, and I doubt anybody is doing this, so I was interested to discuss a code change. However, a better idea than forcing ASGI projects to subclass the middleware would be to perform the lookup against `request.headers`, which already supports lookups by unprefixed header names. This is a little more defensible to document, I feel. The only behavior change would be that an ASGI-only project could now set `header = "WITH-HYPHENS"` and benefit from a more flexible lookup, which is backward compatible. |