Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #14432 +/- ##
=======================================
Coverage 99.12% 99.12%
=======================================
Files 135 135
Lines 53661 53662 +1
Branches 2737 2737
=======================================
+ Hits 53191 53192 +1
Misses 356 356
Partials 114 114
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
[Low impact] The change reaches aiohttp callers using one reverse-proxy header. The code change looks sound, but the required documentation update must land before merging. Reviews (2) · Last reviewed commit: "Fix changelog reference to an undocument..." · Reviewed by Greptile |
What do these changes do?
Adds
hdrs.X_FORWARDED_PREFIX(X-Forwarded-Prefix) to the "de facto; added by reverse proxies and load balancers" group, next toX_FORWARDED_PORTadded in #13886. The header is widely used by proxies and honored by many frameworks to tell a backend the path prefix it is served under.It is needed by home-assistant/core#193747, which sets this header on ingress requests and currently has to define the name itself.
Are there changes in behavior for the user?
No behavior change besides a new public constant. The C parser now returns the shared
istrconstant for this header name.Is it a substantial burden for the maintainers to support this?
One more line in
hdrs.py, in the same group as the existingX_FORWARDED_*constants. The existingtest_known_header_name_is_hdrs_constantcovers it automatically.Related issue number
Checklist
test_known_header_name_is_hdrs_constant)CONTRIBUTORS.txtCHANGES/folderDrafted with Claude Code.